# Logstash error for datadog output plugin

**URL:** <https://discuss.elastic.co/t/logstash-error-for-datadog-output-plugin/28721>\
**Category:** Logstash\
**Created:** [September 5, 2015, 5:05pm UTC](https://discuss.elastic.co/t/logstash-error-for-datadog-output-plugin/28721 "2015-09-05T17:05:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deb/32/46162_2.png) [@Deb](https://discuss.elastic.co/u/Deb)\
**Post date:** [September 5, 2015, 5:05pm UTC](https://discuss.elastic.co/t/logstash-error-for-datadog-output-plugin/28721/1 "2015-09-05T17:05:40Z")

</div>

I am trying to submit some events to datadog from logstash using [datadog output plugin](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-datadog.html). 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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:29am UTC](https://discuss.elastic.co/t/logstash-error-for-datadog-output-plugin/28721/2 "2017-07-06T05:29:58Z")

</div>


