# \[logstash.outputs.nagiosnsca\] TypeError: no implicit conversion of Fixnum into String

**URL:** <https://discuss.elastic.co/t/logstash-outputs-nagiosnsca-typeerror-no-implicit-conversion-of-fixnum-into-string/113024>\
**Category:** Logstash\
**Created:** [December 22, 2017, 3:21pm UTC](https://discuss.elastic.co/t/logstash-outputs-nagiosnsca-typeerror-no-implicit-conversion-of-fixnum-into-string/113024 "2017-12-22T15:21:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrey\_Maraev](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@Andrey\_Maraev](https://discuss.elastic.co/u/Andrey_Maraev)\
**Post date:** [December 22, 2017, 3:21pm UTC](https://discuss.elastic.co/t/logstash-outputs-nagiosnsca-typeerror-no-implicit-conversion-of-fixnum-into-string/113024/1 "2017-12-22T15:21:29Z")

</div>

Hello there!  
I use logstash 6.1.0 with logstash-output-nagios-nsca plugin for sending Errors from my log to the nagios server.  
My config is:  
input {  
file {  
path =\> "/opt/mylog.log"  
start\_position =\> "beginning"  
}  
}  
filter {  
grok {  
match =\> { "message" =\> " ERROR " }  
add\_field =\> { "found" =\> "yes" }  
}  
}  
output {  
if [found]  
{  
nagios\_nsca {  
id =\> "010101"  
codec =\> "plain"  
host =\> "[nagios.server.com](http://nagios.server.com)"  
port =\> 5667  
send\_nsca\_bin =\> "/opt/nsca/send\_nsca"  
send\_nsca\_config =\> "/opt/nsca/send\_nsca.cfg"  
message\_format =\> "%{@timestamp} %{host}: Error message found: %{message}"  
nagios\_host =\> "[myhost.server.com](http://myhost.server.com)"  
nagios\_service =\> "ncsa\_log\_service"  
nagios\_status =\> "2"  
}  
}  
}  
But when ERROR is happened logstash throws some error like:

[2017-12-22T19:04:45,972][WARN][logstash.outputs.nagiosnsca] Skipping nagios\_nsca output; error calling send\_nsca {:error=\>#\<TypeError: no implicit conversion of Fixnum into String\>, :nagios\_nsca\_command=\>"/opt/nsca/send\_nsca -H [nagios.server.com](http://nagios.server.com) -p 5667 -d : -c /opt/nsca/send\_nsca.cfg", :message=\>"[myhost.server.com](http://myhost.server.com):ncsa\_log\_service:2:2017-12-22T15:04:45.603Z rhel7: Error message found: 2017-12-22 19:04:05 ERROR SftpOperations - JSCH -\> SSH\_MSG\_SERVICE\_ACCEPT received", :missed\_event=\>#LogStash::Event:0x118315a2}

any ideas how to fix it?

P.S. Manualy like echo "server\tservice\tstatus\tmessage" | /opt/nsca/send\_nsca -H [nagios.server.com](http://nagios.server.com) -d : -p 5667 -c /opt/nsca/send\_nsca.cfg works fine

---

<div class="post-metadata">

**Author:** ![Andrey\_Maraev](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@Andrey\_Maraev](https://discuss.elastic.co/u/Andrey_Maraev)\
**Post date:** [January 9, 2018, 7:20am UTC](https://discuss.elastic.co/t/logstash-outputs-nagiosnsca-typeerror-no-implicit-conversion-of-fixnum-into-string/113024/2 "2018-01-09T07:20:58Z")

</div>

I've test such scheme with logstash 5.6.3 and it seems to work well

---

<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:** [February 6, 2018, 7:20am UTC](https://discuss.elastic.co/t/logstash-outputs-nagiosnsca-typeerror-no-implicit-conversion-of-fixnum-into-string/113024/3 "2018-02-06T07:20:59Z")

</div>

Closed on February 6, 2018, 7:20am UTC

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