-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[O11y][Nginx] Rally benchmark
nginx.error
(#8762)
* rally benchmark nginx.error * remove extracted fields * revert changes * revert manifest * remove extracted fields * remove timezone config * remove date fields and hostname * update event.timezone
- Loading branch information
Showing
4 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
description: Benchmark 20000 nginx.error events ingested | ||
data_stream: | ||
name: error | ||
corpora: | ||
generator: | ||
total_events: 20000 | ||
template: | ||
type: gotext | ||
path: ./error-benchmark/template.ndjson | ||
config: | ||
path: ./error-benchmark/config.yml | ||
fields: | ||
path: ./error-benchmark/fields.yml |
19 changes: 19 additions & 0 deletions
19
packages/nginx/_dev/benchmark/rally/error-benchmark/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
fields: | ||
- name: 'timestamp' | ||
period: -24h # one day | ||
- name: agent.id | ||
value: "ef5e274d-4b53-45e6-943a-a5bcf1a6f523" | ||
- name: log.level | ||
enum: ["debug", "info", "notice", "warn", "error", "crit", "alert", "emerg"] | ||
- name: process.pid | ||
range: | ||
min: 1 | ||
max: 100000 | ||
- name: thread.id | ||
range: | ||
min: 1 | ||
max: 100000 | ||
- name: connection_id | ||
range: | ||
min: 1 | ||
max: 100000 |
28 changes: 28 additions & 0 deletions
28
packages/nginx/_dev/benchmark/rally/error-benchmark/fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
- name: agent.ephemeral_id | ||
type: keyword | ||
- name: agent.ephemeral_id | ||
type: keyword | ||
- name: agent.id | ||
type: keyword | ||
- name: agent.name | ||
type: keyword | ||
- name: agent.version | ||
type: keyword | ||
- name: agent.version | ||
type: keyword | ||
- name: connection_id | ||
type: long | ||
- name: host.ip | ||
type: ip | ||
- name: host.name | ||
type: keyword | ||
- name: log.level | ||
type: keyword | ||
- name: message | ||
type: text | ||
- name: process.pid | ||
type: long | ||
- name: thread.id | ||
type: long | ||
- name: timestamp | ||
type: date |
72 changes: 72 additions & 0 deletions
72
packages/nginx/_dev/benchmark/rally/error-benchmark/template.ndjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{{- $timestamp := generate "timestamp" }} | ||
{{- $agentId := generate "agent.id" }} | ||
{{- $agentVersion := generate "agent.version" }} | ||
{{- $agentName := generate "agent.name" }} | ||
{{- $agentEphemeralid := generate "agent.ephemeral_id" }} | ||
{{- $logLevel := generate "log.level" }} | ||
{{- $pid := generate "process.pid" }} | ||
{{- $threadId := generate "thread.id" }} | ||
{{- $connectionId := generate "connection_id" }} | ||
{ | ||
"@timestamp": "{{ $timestamp.Format "2006-01-02T15:04:05.000Z" }}", | ||
"agent": { | ||
"ephemeral_id": "{{ $agentEphemeralid }}", | ||
"id": "{{ $agentId }}", | ||
"name": "{{ $agentName }}", | ||
"type": "filebeat", | ||
"version": "8.8.0" | ||
}, | ||
"data_stream": { | ||
"dataset": "nginx.error", | ||
"namespace": "ep", | ||
"type": "logs" | ||
}, | ||
"ecs": { | ||
"version": "8.5.1" | ||
}, | ||
"elastic_agent": { | ||
"id": "{{ $agentEphemeralid }}", | ||
"snapshot": false, | ||
"version": "8.8.0" | ||
}, | ||
"event": { | ||
"agent_id_status": "verified", | ||
"dataset": "nginx.error", | ||
"timezone": "{{ $timestamp.Format "-07:00" }}" | ||
}, | ||
"host": { | ||
"architecture": "x86_64", | ||
"containerized": false, | ||
"hostname": "docker-fleet-agent", | ||
"id": "66392b0697b84641af8006d87aeb89f1", | ||
"ip": [ | ||
"{{ generate "host.ip" }}" | ||
], | ||
"mac": [ | ||
"02-42-AC-12-00-07" | ||
], | ||
"name": "docker-fleet-agent", | ||
"os": { | ||
"codename": "focal", | ||
"family": "debian", | ||
"kernel": "5.15.49-linuxkit", | ||
"name": "Ubuntu", | ||
"platform": "ubuntu", | ||
"type": "linux", | ||
"version": "20.04.5 LTS (Focal Fossa)" | ||
} | ||
}, | ||
"input": { | ||
"type": "log" | ||
}, | ||
"log": { | ||
"file": { | ||
"path": "/var/log/nginx/error.log" | ||
}, | ||
"offset": 0 | ||
}, | ||
"message": "{{$timestamp.Format "2006/01/02 15:04:05"}} [{{ $logLevel }}] {{ $pid }}#{{ $threadId }}: *{{ $connectionId }} {{generate "message"}}", | ||
"tags": [ | ||
"nginx-error" | ||
] | ||
} |