OK here is an update.
The server is setup and has passive checks configured with the freshness_check and freshness_threshold and a script to run that will tell me the nsca clients have stopped sending thier status after 30 minutes. This is working. Nagios is reporting that is has not recieved any reports from this host in 30 minutes because:
When I run from the commandline on the remote client:
./send_nsca -H 188.8.131.52 -c /usr/local/nagios/etc/send_nsca.cfg < test
I get this error:
Error: Server closed connection before init packet was received
Error: Could not read init packet from server
Where 184.108.40.206 is the main Nagios server listening on port 5667. And the file test has:
www2 bar 0 0
www2 has a vaild host.cfg and is included the passive service I mentioned before.
In the file /etc/xinet.d/nsca on the main server:
description: NRPE (Nagios Remote Plugin Executor)
flags = REUSE
socket_type = stream
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nsca
server_args = -c /usr/local/nagios/etc/nsca.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 220.127.116.11
only_from = 18.104.22.168
Where 22.214.171.124 is the public IP of the remote router and 126.96.36.199 is the public IP of the local firewall just in case the daemon only sees the last hop address as a connection point.
Also the /usr/local/nagios/etc/nsca.cfg file on the main server has the remote address of the server, router in the allowed_hosts= directive, but this should make no difference since this file really handles the local daemon which is not going to be used on the remote host. All I want to use on the remote host is the send_nsca binary. Correct?
On the remote host in the send_nsca.cfg file I have a password set and O for encryption. On the main server in the nsca.cfg file I have the same password set and 0 for encryption.
I can see the first packets get to the main Nagios server but the connection gets dropped after that. This error message has been written about quite a bit but I have seen no answers ..... just frustration ....which now includes me....
The boss is starting to ask questions....any ideas?