Skip to content
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

[Nginx] Add benchmark template for error logs #8777

Closed
wants to merge 3 commits into from

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Dec 21, 2023

This is a benchmark template for nginx error logs. It is not complete yet but I share it early to discuss someo of the challenges.

This is a benchmark template for nginx error logs. It is not complete yet but I share it early to discuss someo of the challenges.
@ruflin ruflin self-assigned this Dec 21, 2023
"message": "{{$timestamp | date "2006/01/02 15:04:05"}} [error] {{$processPid}}#{{$processThreadId}}: *1 open() \"/usr/local/Cellar/nginx/1.10.2_1/html/favicon.ico\" failed (2: No such file or directory), client: {{$ip}}, server: localhost, request: \"GET /favicon.ico HTTP/1.1\", host: \"localhost:8080\", referrer: \"http://localhost:8080/\"",
"event": {
"dataset": "nginx.error",
"timezone": "CET"
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm using this to get the right timezone. But this should be dynamic to where the data is generated from to make sure it is always accurate.

My initial plan was to use timestamp.Zone and use the first return param but turns out it is not possible in templates to use functions with more then one return param.

@aspacca As this is a common problem, it would be nice if for example timezone as variable would always be available? What other solutions are there?

Copy link
Contributor

Choose a reason for hiding this comment

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

you can use $timestamp.Format "MST"

Copy link
Member Author

Choose a reason for hiding this comment

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

@aliabbas-elastic Could you try this out in your PR?

@elasticmachine
Copy link

elasticmachine commented Dec 21, 2023

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@ruflin
Copy link
Member Author

ruflin commented Dec 21, 2023

/test benchmark fullreport

@mrodm
Copy link
Contributor

mrodm commented Dec 21, 2023

Hi @ruflin, please update your branch with the latest contents from main branch. There was an important PR merged updating the CI pipelines. Thanks!

@ruflin
Copy link
Member Author

ruflin commented Jan 16, 2024

Closing as all the changes went into #8762

@ruflin ruflin closed this Jan 16, 2024
@ruflin ruflin deleted the nginx-data-generation branch January 16, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants