Here is my logstash configuration file:
input { ... }
filter{
grok {
patterns_dir => ["/usr/local/logstash-2.3.4/patterns/"]
pattern => "%{NGINXPROXY}"
}
...
ruby {
code "ss=event['httpstatus'];print ss" #Here can print the value
}
metrics {
meter => "error_%{httpstatus}"
add_tag => "metric"
ignore_older_than => 10
}
ruby {
code "ss=event['httpstatus'];print ss" #Here I supposed to access nginx 'httpstatus',but get result 'nil'
}
}
output {
stdout => {codec = rubydebug}
}
Here is my logstash configuration file:
input { ... }
filter{
grok {
patterns_dir => ["/usr/local/logstash-2.3.4/patterns/"]
pattern => "%{NGINXPROXY}"
}
...
}
output {
stdout => {codec = rubydebug}
}