mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- fix bytes example
This commit is contained in:
parent
9b7a0806ea
commit
1243df50e8
1 changed files with 9 additions and 4 deletions
|
@ -41,7 +41,10 @@ Logstash can do the above simpler and without much coding skill:
|
||||||
}
|
}
|
||||||
|
|
||||||
output {
|
output {
|
||||||
statsd { increment => "apache.response.%{response}" }
|
statsd {
|
||||||
|
# Count one hit every event by response
|
||||||
|
increment => "apache.response.%{response}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
The above uses grok to parse fields out of apache logs and using the statsd
|
The above uses grok to parse fields out of apache logs and using the statsd
|
||||||
|
@ -50,9 +53,11 @@ are parsing apache logs fully, we can trivially add additional metrics:
|
||||||
|
|
||||||
output {
|
output {
|
||||||
statsd {
|
statsd {
|
||||||
increment => [
|
# Count one hit every event by response
|
||||||
"apache.response.%{response}",
|
increment => "apache.response.%{response}"
|
||||||
"apache.bytes.%{bytes}",
|
|
||||||
|
# Use the 'bytes' field from the apache log as the count value.
|
||||||
|
count => [ "apache.bytes", "%{bytes}" ]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue