Skip to content

[HAProxy] Add timezone offset support #6767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2023

Conversation

P1llus
Copy link
Member

@P1llus P1llus commented Jun 30, 2023

What does this PR do?

HAproxy mostly does not log with a timezone by default, and we hardcode add_local after any custom processors, so its not possible to override the local timezone.

The PR adds the common timezone offset which we use in other integration + changes the order of add_locale to be before custom processors.

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.

@P1llus P1llus added enhancement New feature or request Integration:haproxy HAProxy Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labels Jun 30, 2023
@P1llus P1llus requested a review from a team as a code owner June 30, 2023 12:46
@elasticmachine
Copy link

elasticmachine commented Jun 30, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-06-30T15:00:14.139+0000

  • Duration: 17 min 45 sec

Test stats 🧪

Test Results
Failed 0
Passed 40
Skipped 0
Total 40

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚 2.198
Classes 100.0% (1/1) 💚 2.198
Methods 90.476% (19/21) 👎 -4.761
Lines 97.297% (180/185) 👍 5.357
Conditionals 100.0% (0/0) 💚

@ishleenk17
Copy link
Member

@P1llus : I see this is a timezone input configuration which we take from users in multiple Integrations.
We recently used this in apache_tomcat Integration where the same issue was there, Logging happened without timezone.

I suppose we can make it as a default configuration input for Integrations having logs without timezone.
If nothing is specified in this configuration option, local timezone is taken else the offset entered is considered.

@P1llus
Copy link
Member Author

P1llus commented Jun 30, 2023

@ishleenk17 that is correct. I left the default value in the manifest.yml empty, because add_locale already existed, to prevent any changing behavior for existing users.

Copy link
Member

@ishleenk17 ishleenk17 left a comment

Choose a reason for hiding this comment

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

A nit in the description, else looks good!

@P1llus P1llus merged commit 7b551cf into elastic:main Jun 30, 2023
@elasticmachine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:haproxy HAProxy Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants