I'm trying to get NSCA working, and could use some advice on debugging.
On our Nagios XI 2011R1.2 server (Centos 5.5), I've followed the "Nagios XI - Using the NSCA Addon" guide to configure NSCA.
In /etc/xinetd.d/nsca, I commented out "only_from".
In nsca.cfg, I've got "debug=1", "password" commented out, and "decryption_method=0".
In send_nsca.cfg, I've got "password" commented out, and "decryption_method=0".
"telnet localhost 5667" shows the port open, but gets a gibberish response.
"send_nsca -H localhost -c send_nsca.cfg < test.txt", where test.txt is "localhost TestMessage 0 Testing" (tab separated), writes to syslog, showing Xinetd receiving the request, passing it to nsca, the parsed Service Check that matches test.txt, and an error-free exit.
"tail -f" on nagios.cmd never shows any activity, though.
Moving over to a Solaris 9 Sparc client, I can ping the XI server, but "telnet <XI Server's IP> 5667" just hangs.
Using the same send_nsca.cfg and test.txt, "send_nsca -H <XI Server IP> -c send_nsca.cfg < test.txt" just times out after 10 seconds, with no entry in the Client or Server's syslog files.
The only thing I can think of is that port 5667 is somehow still blocked. Any ideas?
Thanks....Lyle
nsca debugging
Re: nsca debugging
In the Admin->Inbound Transfers, try settings the configs there.
Make sure the following line is in your /etc/sysconfig/iptables:
Here's an example shell script that I use to test passive results on our local network:
Note that if the host and service names don't match exactly, the results will not be process by Nagios. However, you can use the "Unconfigured Objects" page to add them if they don't exist. This assumes of course that the results can get to the machine ok.
Make sure the following line is in your /etc/sysconfig/iptables:
Code: Select all
# NSCA
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5667 -j ACCEPT
Here's an example shell script that I use to test passive results on our local network:
Code: Select all
#!/bin/bash
#define host/service stuff here
HOST="My Host"
SERVICE="My Service"
STATE=1
#plugin output/perf data to test
OUTPUT="My Plugin Output"
#define your service to send results to:
SERV="127.0.0.1"
CFG="/usr/local/nagios/etc/send_nsca.cfg"
SEND="/usr/local/nagios/libexec/send_nsca"
LIB="/usr/local/nagios/libexec"
#script
/bin/echo $CMD0 | $SEND -H $SERV -d ';' -c $CFG