<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE: [Nagios-users] Distributed nagios system</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: nagios-users-bounces@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>[<A HREF="mailto:nagios-users-bounces@lists.sourceforge.net">mailto:nagios-users-bounces@lists.sourceforge.net</A>]On Behalf Of Bryan</FONT>
<BR><FONT SIZE=2>Loniewski</FONT>
<BR><FONT SIZE=2>Sent: 27 September 2006 21:39</FONT>
<BR><FONT SIZE=2>To: nagios-users@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>Subject: Re: [Nagios-users] Distributed nagios system</FONT>
</P>
<BR>
<P><FONT SIZE=2>> Message: 3</FONT>
<BR><FONT SIZE=2>> Date: Wed, 27 Sep 2006 11:11:23 +0200</FONT>
<BR><FONT SIZE=2>> From: John Longland <jlongland@grintek.com></FONT>
<BR><FONT SIZE=2>> Subject: [Nagios-users] Distributed nagios system</FONT>
<BR><FONT SIZE=2>> To: "'nagios-users@lists.sourceforge.net'"</FONT>
<BR><FONT SIZE=2>> <nagios-users@lists.sourceforge.net></FONT>
<BR><FONT SIZE=2>> Message-ID:</FONT>
<BR><FONT SIZE=2>> <510595ECCFAEFC44941F5EDA4324F275011F9B84@gtmail.Grintel.com></FONT>
<BR><FONT SIZE=2>> Content-Type: text/plain; charset="iso-8859-1"</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Hi all !!</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> I've had to implement a distributed systemand I have gone through some docs</FONT>
<BR><FONT SIZE=2>> I found on sourceforge.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> I'll briefly mention what I have done:</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> slave nagios</FONT>
<BR><FONT SIZE=2>> 1. Installed the nsca pack</FONT>
<BR><FONT SIZE=2>> 2. put send_nsca.cfg -> /etc</FONT>
<BR><FONT SIZE=2>> 3. modified entry for ocsp_sommand in nagios,cfg</FONT>
<BR><FONT SIZE=2>> 4. enabled obesess over services</FONT>
<BR><FONT SIZE=2>> 5. enable_notifications set to 0</FONT>
<BR><FONT SIZE=2>> 6. Defined a command called submit_check_result in my minimal.cfg</FONT>
<BR><FONT SIZE=2>> 7. Written submit_check_result script and placed it in ../libexec</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> server side:</FONT>
<BR><FONT SIZE=2>> 1. Installed nsca pack</FONT>
<BR><FONT SIZE=2>> 2. nsca,cfg -> /usr/local/nagios/etc</FONT>
<BR><FONT SIZE=2>> 3. active service checks 1 for services checked from main nagios</FONT>
<BR><FONT SIZE=2>> set to 0 for service checked from slave nagios</FONT>
<BR><FONT SIZE=2>> 4. externetl commands checks enabled</FONT>
<BR><FONT SIZE=2>> 5. passive service checks enabled</FONT>
<BR><FONT SIZE=2>> 6. nsca -> /usr/local/nagios/bin</FONT>
<BR><FONT SIZE=2>> 7. check existance of /usr/local/nagios/var/rw/nagios.cmd</FONT>
<BR><FONT SIZE=2>> 8. wrote nsca script in /etc/xinetd.d</FONT>
<BR><FONT SIZE=2>> 9. added entry in /etc/services called NSCA</FONT>
<BR><FONT SIZE=2>> 10. restarted xinetd</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Problem.</FONT>
<BR><FONT SIZE=2>> When I send info from slave to main nagios by hand, it is sent and</FONT>
<BR><FONT SIZE=2>> reported by the main nagios, correctly.</FONT>
<BR><FONT SIZE=2>> When I remove /usr/local/nagios/libexec/submit_check_result, I get an error</FONT>
<BR><FONT SIZE=2>> indicating that the slave</FONT>
<BR><FONT SIZE=2>> nagios is trying to execute a non-existing script.</FONT>
<BR><FONT SIZE=2>> When I re-instate the submit_check_result script, nothing happens. No error</FONT>
<BR><FONT SIZE=2>> in any log.</FONT>
<BR><FONT SIZE=2>> I do not see any attempt on the network ( tcpdump) that the slave is trying</FONT>
<BR><FONT SIZE=2>> to contact the main</FONT>
<BR><FONT SIZE=2>> nagios.</FONT>
<BR><FONT SIZE=2>> I have also added a little echo statement in the submit_check_result script</FONT>
<BR><FONT SIZE=2>> that writes to a file.</FONT>
</P>
<P><FONT SIZE=2>A few questions:</FONT>
</P>
<P><FONT SIZE=2>What version of nagios are you running? </FONT>
<BR><FONT SIZE=2>When you added the echo statement was IT the only thing in the script?</FONT>
<BR><FONT SIZE=2>or did you leave the rest of the script intact? </FONT>
<BR><FONT SIZE=2>What are the permissions of the directories, files of where your </FONT>
<BR><FONT SIZE=2>submit_check_result script is? </FONT>
<BR><FONT SIZE=2>Did you try running the script by hand as the user nagios runs under?</FONT>
</P>
<P><FONT SIZE=2>PS: Give an example of what your submit_check_result script looks like.</FONT>
</P>
<P><FONT SIZE=2>Hi Bryan !!!</FONT>
</P>
<P><FONT SIZE=2>Thanks for your mail. </FONT>
</P>
<P><FONT SIZE=2>I have since dicovered that the problem was the permissions of</FONT>
<BR><FONT SIZE=2>my send_nsca.cfg file !! For completeness:</FONT>
<BR><FONT SIZE=2>Version of nagios is 2.4</FONT>
<BR><FONT SIZE=2>The echo statement was simply added with all other statements intact</FONT>
<BR><FONT SIZE=2>The permissions of the script files are readable and executable</FONT>
<BR><FONT SIZE=2>by anyone. It is owned by nagios:nagios.</FONT>
<BR><FONT SIZE=2>As I said above, I slipped up with not checking the send_nsca.cfg file !!!</FONT>
</P>
<P><FONT SIZE=2>Thanks for your time, Bryan. Much appreciated !!!!</FONT>
<BR><FONT SIZE=2>John</FONT>
</P>
</BODY>
</HTML>