# Lostash - nagios\_nsca plugin - nagios\_status

**URL:** <https://discuss.elastic.co/t/lostash-nagios-nsca-plugin-nagios-status/179377>\
**Category:** Logstash\
**Created:** [May 2, 2019, 1:59pm UTC](https://discuss.elastic.co/t/lostash-nagios-nsca-plugin-nagios-status/179377 "2019-05-02T13:59:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [May 2, 2019, 1:59pm UTC](https://discuss.elastic.co/t/lostash-nagios-nsca-plugin-nagios-status/179377/1 "2019-05-02T13:59:54Z")

</div>

Hello,  
I am trying to send passive check to nagios using Logstash nagios\_nsca plugin.

**Elasticstack v 6.3.2**

```
/usr/share/logstash/bin/logstash-plugin list | grep nsca
logstash-output-nagios_nsca

```

**Configuration:**

```
pipeline:
input {
 http {
    port => 10040
  }
}

filter {
  json {
    source => "message"
  }
}

output {

   if ( [app] == "application" and [env] == "prod" and [message] =~ /^Error/ ) {

       nagios_nsca {
         host => "10.88.88.200"
         port => 5667
         nagios_host => "10.88.88.250"
         nagios_service => "application.error-detection"
         nagios_status => 2
         send_nsca_bin => "/usr/sbin/send_nsca"
         send_nsca_config => "/etc/nagios/send_nsca.cfg"
         message_format => "%{message}"
       }

       elasticsearch {
        hosts => ["localhost:9200"]
        index => "alerts-%{+YYYY.MM}"
        user => "logstash"
        password => "" ******"
      }
   } else {
        elasticsearch {
        hosts => ["localhost:9200"]
        index => "noalerts-%{+YYYY.MM}"
        user => "logstash"
        password => " ******"
      }

   }
}

```

**Sending event to logstash:**

```
curl -XPOST localhost:10040/libovolne-url -d '{ "env" : "prod", "app":"odis", "message":"Error processOdis" }'
ok

```

**Log of logstash**  
`[2019-05-02T15:44:43,954][WARN][logstash.outputs.nagiosnsca] Skipping nagios_nsca output; error calling send_nsca {:error=>#<TypeError: no implicit conversion of Integer into String>, :nagios_nsca_command=>"/usr/sbin/send_nsca -H 10.88.88.250 -p 5667 -d : -c /etc/nagios/send_nsca.cfg", :message=>"cdv.tomcat-cdc-as1:TOMCAT.odis.error-detection:2:Error processOdis", :missed_event=>#<LogStash::Event:0x25cbded2>}`

I check network traffic using tcpdump but nothing happend. Problem is with parameter **nagios\_status**. I tried "2", '2', "CRITICAL" but nothing worked.

Could you please help me?  
Regards!  
Vasek

---

<div class="post-metadata">

**Author:** ![nickjwest](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@nickjwest](https://discuss.elastic.co/u/nickjwest)\
**Post date:** [May 24, 2019, 9:06am UTC](https://discuss.elastic.co/t/lostash-nagios-nsca-plugin-nagios-status/179377/2 "2019-05-24T09:06:47Z")

</div>

Hi,

Did you ever resolve this as seeing the same...?

Regards

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 17, 2019, 7:37am UTC](https://discuss.elastic.co/t/lostash-nagios-nsca-plugin-nagios-status/179377/3 "2019-06-17T07:37:58Z")

</div>

I used Elastalert instead of Logstash nagios\_nsca plugin.

---

<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 15, 2019, 7:38am UTC](https://discuss.elastic.co/t/lostash-nagios-nsca-plugin-nagios-status/179377/4 "2019-07-15T07:38:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
