[Nginx] Add benchmark template for error logs#8777
[Nginx] Add benchmark template for error logs#8777ruflin wants to merge 3 commits intoelastic:mainfrom
Conversation
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.
| "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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
you can use $timestamp.Format "MST"
There was a problem hiding this comment.
@aliabbas-elastic Could you try this out in your PR?
🚀 Benchmarks reportTo see the full report comment with |
|
/test benchmark fullreport |
|
Hi @ruflin, please update your branch with the latest contents from main branch. There was an important PR merged updating the CI pipelines. Thanks! |
|
Closing as all the changes went into #8762 |
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.