[Nagiosplug-help] Running NSCA and NRPE on server under XINETD
p.boynton at fbsa.es
p.boynton at fbsa.es
Tue Jun 3 14:50:16 CEST 2008
OK here is an update.I soon realized that I could get nrpe and nsca to run
together and in fact I really didnt need nrpe listening on the main server
since nrpe PULLS client status and nsca LISTENS for remote connections. I
just had to think it out.
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 on the main server and is included the passive
service I mentioned before.
In the file /etc/xinet.d/nsca on the main server:
# default: on
# 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. And xinetd was compiled with
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?
On Mon, 02 Jun 2008 13:18:26 +0200, wrote:
> I have a working Nagios server 3.0.1 with the 1.4.12 plugins running on
> Debian Etch 4.02.and I have set up NRPE 2.12 for hosts in my local
> Everything is working fine.
> Now I need to introduce alerts for remote machines (as in over the
> and who will be behind NAT devices out of my control). So I looked around
> and found NSCA. This seemed like the right solution, but now I found this
> is the README for NSCA:
> NOTE: If you run nsca under inetd or xinetd, the server_port
> and allowed_hosts variables in the nrpe configuration file are
> On a test server that wes set up with NRPE and running under xinetd I
> installed NSCA and ran it under xinetd and BOOM NRPE was no longer
> listening on port 5666. So any NRPE clients trying to send thier data
> not be able to. This would break my current setup.
> 1. Is it a situation of all or nothing? I mean you can use NSCA or NRPE
> under xinetd but not both on the same server?
> 2. If you wanted to use both how could you do it? Or better yet, how can
> get those remote boxes to tell my main server all is/isnt well?
> Thanks for any help you might be able to give. I appreciate it very much
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
More information about the Help