Skip to content

[panw] Use high-res timestamp and ensure time zone config is applied - #10618

Merged
taylor-swanson merged 3 commits into
elastic:mainfrom
taylor-swanson:bug/panw-time-config
Jul 29, 2024
Merged

[panw] Use high-res timestamp and ensure time zone config is applied#10618
taylor-swanson merged 3 commits into
elastic:mainfrom
taylor-swanson:bug/panw-time-config

Conversation

@taylor-swanson

@taylor-swanson taylor-swanson commented Jul 26, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

  • The high-res timestamp will now be copied to @timestamp, if available, since this is a more accurate timestamp of when the event occurred.
  • The tz_offset config value was only propagated to the pipeline if the logfile input was used. It is now propagated for the TCP and UDP inputs as well.
  • If the tz_offset is not local, then it will override event.timezone, otherwise event.timezone will be set to the value given by the add_locale processor.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

cd packages/panw
elastic-package test

Related issues

  • Relates elastic/sdh-beats#4982
@taylor-swanson taylor-swanson added bug Something isn't working, use only for issues Integration:panw Palo Alto Next-Gen Firewall Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices] labels Jul 26, 2024
@taylor-swanson taylor-swanson self-assigned this Jul 26, 2024
@elasticmachine

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@taylor-swanson

Copy link
Copy Markdown
Contributor Author

The fix is proving to be a bit more involved for the time zone configuration, and will require a bit more work before this PR is ready.

- The high-res timestamp will now be copied to @timestamp, if available, since
this is a more accurate timestamp of when the event occurred.
- The high-res timestamp will be removed if it begins with 1969-12-31, since this
indicates the time is a placeholder generated by PanOS 9.x or earlier.
- The tz_offset config value was only propagated to the pipeline if the logfile
input was used. It is now propagated for the TCP and UDP inputs as well.
- event.timezone will be overwritten by _conf.tz_offset if the value
is not 'local' (case insensitive)
@taylor-swanson
taylor-swanson marked this pull request as ready for review July 29, 2024 16:55
@taylor-swanson
taylor-swanson requested a review from a team as a code owner July 29, 2024 16:55
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

@pkoutsovasilis pkoutsovasilis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @taylor-swanson

@elastic-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
55.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@taylor-swanson
taylor-swanson merged commit 51ef729 into elastic:main Jul 29, 2024
@taylor-swanson
taylor-swanson deleted the bug/panw-time-config branch July 29, 2024 17:46
@elasticmachine

Copy link
Copy Markdown

Package panw - 3.26.4 containing this change is available at https://epr.elastic.co/search?package=panw

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
…lastic#10618)

- The high-res timestamp will now be copied to @timestamp, if available, since
this is a more accurate timestamp of when the event occurred.
- The high-res timestamp will be removed if it begins with 1969 or 1970, since
this indicates the time is a placeholder generated by PanOS 9.1 or earlier.
- The tz_offset config value was only propagated to the pipeline if the logfile
input was used. It is now propagated for the TCP and UDP inputs as well.
- event.timezone will be overwritten by _conf.tz_offset if the value
is not 'local' (case insensitive)
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
…lastic#10618)

- The high-res timestamp will now be copied to @timestamp, if available, since
this is a more accurate timestamp of when the event occurred.
- The high-res timestamp will be removed if it begins with 1969 or 1970, since
this indicates the time is a placeholder generated by PanOS 9.1 or earlier.
- The tz_offset config value was only propagated to the pipeline if the logfile
input was used. It is now propagated for the TCP and UDP inputs as well.
- event.timezone will be overwritten by _conf.tz_offset if the value
is not 'local' (case insensitive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working, use only for issues Integration:panw Palo Alto Next-Gen Firewall Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices]

3 participants