Page 1 of 1

PROCESS_SERVICE_CHECK_RESULT failed

Posted: Fri Sep 06, 2019 4:28 pm
by TechnicallyTrue
Hello,
I'm using Nagios Core 4.3.4 and am attempting to set up NSCA as per this document:
http://nagios.sourceforge.net/download/ ... _Setup.pdf
The issue I get is when I try to run the command /usr/local/nagios/bin/send_nsca name of localhost -c /usr/local/nagios/etc/send_nsca.cfg < /tmp/tmp, I get the following output in the log file:

Code: Select all

 SERVICE CHECK -> Host Name: '[name of localhost]', Service Description: 'TestMessage', Return Code: '0', Output: 'This is a test message.'
 Attempting to write to nagios command pipe
 End of connection...
 EXIT: nsca status=0 pid=15201 duration=1(sec)
 EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;
 Error: External command failed -> PROCESS_SERVICE_CHECK_RESULT;
 External command error: Command failed
 External command error: Malformed command
I haven't been able to find any talk online of errors with PROCESS_SERVICE_CHECK_RESULT where the parameters are not displayed. Verifying the Nagios configuration turns up no errors. Here is the info in the file /tmp/tmp:

Code: Select all

[name of localhost]  TestMessage     0       This is a test message.
And pretty well everything else is the same as on the 5th page of the document, with the only change being the host name, which matches what I entered for the test message.
Thank you very much!

Re: PROCESS_SERVICE_CHECK_RESULT failed

Posted: Fri Sep 06, 2019 4:48 pm
by scottwilkerson
Do you have a service on this host with the service_description of TestMessage?

If I use this file

Code: Select all

#cat /tmp/tmp
localhost      TestMessage    2       ERROR
I get the same results you do, until I add the a service with the service_description TestMessage to localhost

Re: PROCESS_SERVICE_CHECK_RESULT failed

Posted: Tue Sep 10, 2019 12:51 pm
by TechnicallyTrue
Well, turns out I'm just bad at vim. There was a newline in /tmp/tmp before the main body of the file, which messed everything up.
Thanks for the help, though!

Re: PROCESS_SERVICE_CHECK_RESULT failed

Posted: Tue Sep 10, 2019 12:55 pm
by scottwilkerson
TechnicallyTrue wrote:Well, turns out I'm just bad at vim. There was a newline in /tmp/tmp before the main body of the file, which messed everything up.
Thanks for the help, though!
Glad it is resolved!

Locking