<br><font size=2 face="sans-serif">Hi there,</font>
<br>
<br><font size=2 face="sans-serif">Your config looks OK, same as I have
configured on my side.</font>
<br>
<br><font size=2 face="sans-serif">Perhaps the tcpd spends some LOG?<br>
</font>
<br><font size=3>Yours </font>
<br><font size=3>Hendrik</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Michael Tucker <mtucker@airmail.net></b>
</font>
<br><font size=1 face="sans-serif">Gesendet von: nagios-users-admin@lists.sourceforge.net</font>
<p><font size=1 face="sans-serif">12.01.2004 23:33</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">An</font></div>
<td valign=top><font size=1 face="sans-serif">nagios-users@lists.sourceforge.net</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Kopie</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Thema</font></div>
<td valign=top><font size=1 face="sans-serif">[Nagios-users] NEED HELP
configuring NSCA with INETD</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Howdy:<br>
<br>
I have finally succeeded in my initial installation and configuration  <br>
of Nagios, with help from Marc Powell (thanks, Marc!). I have a  <br>
distributed nagios server, performing checks on a monitored host (using
 <br>
check_nrpe + nrpe), and forwarding the results to a central nagios  <br>
server (using send_nsca + nsca). I am able to monitor the state of  <br>
everything on either server via its web interface and Apache. The  <br>
central server sends me notifications via email. Life is good. :-)<br>
<br>
All is well, except for two things:<br>
<br>
1) NRPE 2.0 doesn't work with SSL enabled. (This is being discussed in
 <br>
other threads.)<br>
<br>
2) I haven't been able to get NSCA to work within inetd (using tcp  <br>
wrappers). That is the point of this message.<br>
<br>
NSCA works fine as a standalone daemon, i.e. if I launch it using the  <br>
command:<br>
<br>
# /usr/local/nagios/bin/nsca -c /usr/local/nagios/bin/nsca.cfg --single<br>
<br>
then it works great. The status messages being collected by the  <br>
distributed server are successfully passed to the central server, which
 <br>
then displays them correctly via its web interface.<br>
<br>
But it does *not* work if I try to run it under inetd.<br>
<br>
In that case, I get this message on the distributed server (the one  <br>
running send_nsca):<br>
> Error: Server closed connection before init packet was received<br>
> Error: Could not read init packet from server<br>
<br>
No data is passed to the central server, and it displays "(No output!)"
 <br>
for each of the monitored host's services.<br>
<br>
Here are the relevant files:<br>
<br>
/etc/hosts.allow:<br>
> nsca: {IP of allowed host}<br>
<br>
/etc/hosts.deny:<br>
> ALL: ALL<br>
<br>
/etc/inetd.conf:<br>
> nsca                
                 stream
               
tcp                
nowait                
nagios                
/usr/sfw/sbin/tcpd              
  /usr/local/nagios/ <br>
> bin/nsca -c /usr/local/nagios/bin/nsca.cfg --inetd<br>
<br>
/etc/services:<br>
> nsca                
                 5667/tcp
               
# Nagios service check acceptor<br>
<br>
# ls -l /usr/sfw/sbin/tcpd<br>
> -r-xr-xr-x   1 root     bin        
 5452 Apr  6  2002   <br>
> /usr/sfw/sbin/tcpd<br>
<br>
# ls -l /usr/local/nagios/bin<br>
> -rwxrwxr--   1 nagios   nagios    251472 Dec 12
12:02 nagios<br>
> -rwxr-xr-x   1 nagios   nagios    167896 Dec 23
12:20 nsca<br>
> -rw-r--r--   1 nagios   nagios      4997
Jan 12 09:42 nsca.cfg<br>
<br>
/usr/local/nagios/bin/nsca.cfg (omitting comments):<br>
> server_port=5667<br>
> allowed_hosts={IP of allowed host, same as in /etc/hosts.allow}<br>
> nsca_user=nagios<br>
> nsca_group=nagios<br>
> debug=0<br>
> command_file=/usr/local/nagios/var/rw/nagios.cmd<br>
> alternate_dump_file=/usr/local/nagios/var/rw/nsca.dump<br>
> aggregate_writes=0<br>
> append_to_file=0<br>
> max_packet_age=30<br>
> password={password, same as in send_nsca.cfg on distributed server}<br>
> decryption_method=1 {same as in send_nsca.cfg on distributed server}<br>
<br>
Just to stress the point: this *works* if I run NSCA as a standalone  <br>
daemon. It just doesn't work if I try to run NSCA through inetd.<br>
<br>
I'm stumped. Any ideas, anyone?<br>
<br>
FYI, I'm running nagios 1.1, nsca 2.4, nrpe 2.0 (i.e. all the latest  <br>
versions) under Solaris 9 (with all patches up to date).<br>
<br>
Yours,<br>
Michael<br>
<br>
<br>
<br>
-------------------------------------------------------<br>
This SF.net email is sponsored by: Perforce Software.<br>
Perforce is the Fast Software Configuration Management System offering<br>
advanced branching capabilities and atomic changes on 50+ platforms.<br>
Free Eval! http://www.perforce.com/perforce/loadprog.html<br>
_______________________________________________<br>
Nagios-users mailing list<br>
Nagios-users@lists.sourceforge.net<br>
https://lists.sourceforge.net/lists/listinfo/nagios-users<br>
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. <br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</tt></font>
<br>