Open slava-vishnyakov opened 9 years ago
cat > /tmp/filter.txt << EOM
input { stdin { } }
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z"]
}
}
output {
datadog_metrics {
api_key => "..."
metric_name => 'response_time'
metric_type => "counter"
metric_value => "1"
}
}
EOM
echo '1.2.3.4 - - [09/Jun/2015:15:50:04 +0300] "POST / HTTP/1.1" 499 0 "-" "-" "-"' | /opt/logstash/bin/logstash -e "$(cat /tmp/filter.txt)"
This code triggers the error
+1
Will provide a code for the error in a few minutes.