PROCESS_SERVICE_CHECK_RESULT failed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
TechnicallyTrue
Posts: 25
Joined: Mon May 13, 2019 11:57 am

PROCESS_SERVICE_CHECK_RESULT failed

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: PROCESS_SERVICE_CHECK_RESULT failed

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
TechnicallyTrue
Posts: 25
Joined: Mon May 13, 2019 11:57 am

Re: PROCESS_SERVICE_CHECK_RESULT failed

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: PROCESS_SERVICE_CHECK_RESULT failed

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked