Page 1 of 1

Problem with NSCA Plugin Passive Check

PostPosted: Wed Mar 09, 2022 3:10 am
by Aegir
Hallo Nagios Community,
im updating my companies Nagios Core Monitoring Server and i run into some problems with the NSCA Plugin.
One of my old co-workers made a script for our Windows machines that sends an exitcode to a check-dummy service after checking if our backups were run or not. If the backup was successful it sends a 0 so the dummy_check goes to OK and if not it sends a 3 for critical.
I opend the port 5667 on my Nagios Core Server for NSCA, allowed the Windows machines IP to communicate with the server and set up a new passive check with the dummy_check.

Now to the problem:
Everytime the script ends there is the message

Error: Server closed connection before init packet was received
Error: Coud not read init packet from server
the process tried to write to a nonexistent pipe

The line of code my co-worker said that should send the 0 or 3 looks like this:

echo winHostName\tservicedescription\t0\tOK | send_nsca\send_nsca -H NagiosIP -d "\t" -c send_nsca\send_nsca.cfg

Im new to Nagios and i started working with it around 3 month ago i got most of the checks working but im still new to the whole Linux environment and Nagios Core.

I hope someone can help me with my problem i would really appreciate any help.

Linux Server: Ubuntu 20.04 (GNU/Linux 5.4.0-104-generic x84_64)
Nagios Core Version: 4.4.6
NSCA Version 2.9.2