I am trying to submit some events to datadog from logstash using datadog output plugin. Below is my logstash config:-
input {
stdin{
type => "stdin-type"
codec => json {}
}
}
output {
if "_jsonparsefailure" in [tags] {
stdout { codec => rubydebug }
datadog {
api_key => "xxxxxx"
}
}
}
On typing some non-json input (let's say hello
) in STDIN of logstash I am getting the below output and not seeing any events in datadog.
Logstash startup completed
hello
{
"message" => "hello",
"tags" => [
[0] "_jsonparsefailure"
],
"@version" => "1",
"@timestamp" => "2015-09-05T16:55:41.652Z",
"type" => "stdin-type",
"host" => "jabong-1383"
}
Unhandled exception {:request=>"#<Net::HTTP::Post POST>", :response=>"#<Net::HTTPAccepted 202 Accepted readbody=true>", :exception=>"RuntimeError", :level=>:warn}
Environment
- Logstash Version 1.5.2
Can someone let me know what I am doing wrong?