Skip to content

[Nginx] Add benchmark template for error logs#8777

Closed
ruflin wants to merge 3 commits intoelastic:mainfrom
ruflin:nginx-data-generation
Closed

[Nginx] Add benchmark template for error logs#8777
ruflin wants to merge 3 commits intoelastic:mainfrom
ruflin:nginx-data-generation

Conversation

@ruflin
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor 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
Copy Markdown

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
Copy Markdown
Contributor 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
Copy Markdown

elasticmachine commented Dec 21, 2023

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@ruflin
Copy link
Copy Markdown
Contributor Author

ruflin commented Dec 21, 2023

/test benchmark fullreport

@mrodm
Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor 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.

4 participants