<!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 6.0.4418.33">
<TITLE>RE: SOLVED [Nagios-users] Schedule An Immediate Check - I have rtfmand stfw no help</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Awsome job Armin, that was bugging me too and you solved it!</FONT>
</P>
<P> <FONT SIZE=2>richg</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Armin Irger [<A HREF="mailto:irger@fh-rosenheim.de">mailto:irger@fh-rosenheim.de</A>]</FONT>
<BR><FONT SIZE=2>Sent: Friday, February 07, 2003 8:29 AM</FONT>
<BR><FONT SIZE=2>To: Marc Powell</FONT>
<BR><FONT SIZE=2>Cc: nagios-users@lists.sourceforge.net; nagios@nagios.org</FONT>
<BR><FONT SIZE=2>Subject: SOLVED [Nagios-users] Schedule An Immediate Check - I have</FONT>
<BR><FONT SIZE=2>rtfmand stfw no help</FONT>
</P>
<BR>
<P><FONT SIZE=2>At the first time i changed the permissions by hand, but after a restart</FONT>
<BR><FONT SIZE=2>from nagios the problem appears because.</FONT>
</P>
<P><FONT SIZE=2>1. After the restart from nagios he creates the nagios.cmd like this.</FONT>
</P>
<P><FONT SIZE=2>prw-rw---- 1 nagios nagios 0 Feb 7 17:11 nagios.cmd</FONT>
</P>
<P><FONT SIZE=2>2. The apache runs under nobody and if you follow the installation</FONT>
<BR><FONT SIZE=2>descriped on the "External Command File Permission" you add nobody to</FONT>
<BR><FONT SIZE=2>the nagiocmd group, and with the chown nagios.nagiocmd you give the</FONT>
<BR><FONT SIZE=2>rw-rights to the nagiocmd group. </FONT>
<BR><FONT SIZE=2>The apache can access the nagios/var/rw directory but he can't access</FONT>
<BR><FONT SIZE=2>the nagios.cmd, which is regenerated by a every restart of nagios,</FONT>
<BR><FONT SIZE=2>because nagios creates the nagios.cmd like above. </FONT>
</P>
<P><FONT SIZE=2>3. I make a chgrp nagios.nagios to the nagios/var/rw directory and added</FONT>
<BR><FONT SIZE=2>nobody back do the nagios group with usermod -G nagios nobody. </FONT>
</P>
<P><FONT SIZE=2>4. After every reboot nagios starts in the right way. </FONT>
</P>
<P><FONT SIZE=2>------</FONT>
<BR><FONT SIZE=2>Armin </FONT>
</P>
<BR>
<P><FONT SIZE=2>On Fri, 2003-02-07 at 16:25, Marc Powell wrote:</FONT>
<BR><FONT SIZE=2>> Assuming that your apache installation runs as group 'nobody', what do </FONT>
<BR><FONT SIZE=2>> the permissions on the directories above /opt/nagios/var/rw look like? </FONT>
<BR><FONT SIZE=2>> If /opt/nagios were chmod 600, then the web server would not be able to </FONT>
<BR><FONT SIZE=2>> read rw, etc... You also might want to try restarting your web server </FONT>
<BR><FONT SIZE=2>> just in case.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> --</FONT>
<BR><FONT SIZE=2>> Marc</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > -----Original Message-----</FONT>
<BR><FONT SIZE=2>> > From: Armin Irger [<A HREF="mailto:irger@fh-rosenheim.de">mailto:irger@fh-rosenheim.de</A>]</FONT>
<BR><FONT SIZE=2>> > Sent: Friday, February 07, 2003 9:05 AM</FONT>
<BR><FONT SIZE=2>> > To: nagios-users@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>> > Subject: [Nagios-users] Schedule An Immediate Check - I have rtfm and stfw</FONT>
<BR><FONT SIZE=2>> > no help</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > Hi,</FONT>
<BR><FONT SIZE=2>> > i using debian woody 3.0r1 and compiled nagios from the source. Nagios</FONT>
<BR><FONT SIZE=2>> > is "jailed" in /opt/nagios-1.0 and accessing over a link /opt/nagios.</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > nagios.cfg settings:</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > check_external_commands=1</FONT>
<BR><FONT SIZE=2>> > command_check_interval=-1</FONT>
<BR><FONT SIZE=2>> > command_file=/opt/nagios/var/rw/nagios.cmd</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > I setup the nagios.cmd file how it be descripted in the commandfile.html</FONT>
<BR><FONT SIZE=2>> > /usr/sbin/groupadd nagiocmd</FONT>
<BR><FONT SIZE=2>> > /usr/sbin/usermod -G nagiocmd nagios</FONT>
<BR><FONT SIZE=2>> > /usr/sbin/usermod -G nagiocmd nobody</FONT>
<BR><FONT SIZE=2>> > mkdir /opt/nagios/var/rw</FONT>
<BR><FONT SIZE=2>> > chown nagios.nagiocmd /opt/nagios/var/rw</FONT>
<BR><FONT SIZE=2>> > chmod u+rwx /opt/nagios/var/rw</FONT>
<BR><FONT SIZE=2>> > chmod g+rw /opt/nagios/var/rw</FONT>
<BR><FONT SIZE=2>> > chmod g+s /opt/nagios/var/rw</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > The ls -l /opt/nagioss/var/ looks like</FONT>
<BR><FONT SIZE=2>> > drwxrwSr-- 2 nagios nagiocmd 4096 Feb 7 15:10 rw</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > cgi.cfg settings:</FONT>
<BR><FONT SIZE=2>> > authorized_for_system_information=nagiosadmin</FONT>
<BR><FONT SIZE=2>> > authorized_for_configuration_information=nagiosadmin</FONT>
<BR><FONT SIZE=2>> > authorized_for_system_commands=nagiosadmin</FONT>
<BR><FONT SIZE=2>> > authorized_for_all_hosts=nagiosadmin,guest</FONT>
<BR><FONT SIZE=2>> > authorized_for_all_service_commands=nagiosadmin</FONT>
<BR><FONT SIZE=2>> > authorized_for_all_host_commands=nagiosadmin</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > I'am logged in as nagiosadmin and when i try to start a "Schedule an</FONT>
<BR><FONT SIZE=2>> > immediate check of all services on this host" from the Host Command's i</FONT>
<BR><FONT SIZE=2>> > get this error back after i commit the command.</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > Error: Could not stat() command file '/opt/nagios/var/rw/nagios.cmd'!</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > The external command file may be missing, Nagios may not be running,</FONT>
<BR><FONT SIZE=2>> > and/or Nagios may not be checking external commands.</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > An error occurred while attempting to commit your command for</FONT>
<BR><FONT SIZE=2>> > processing.</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > Greetings</FONT>
<BR><FONT SIZE=2>> > Armin</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > --</FONT>
<BR><FONT SIZE=2>> > Wundere dich nicht daß du nicht ankommst,</FONT>
<BR><FONT SIZE=2>> > wenn du nicht weißt wo du hin willst.</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > ====================================================================</FONT>
<BR><FONT SIZE=2>> > Fachhochschule Rosenheim</FONT>
<BR><FONT SIZE=2>> > Armin Irger</FONT>
<BR><FONT SIZE=2>> > Hochschulstr. 1</FONT>
<BR><FONT SIZE=2>> > D-83024 Rosenheim</FONT>
<BR><FONT SIZE=2>> > Tel. +498031 805-532</FONT>
<BR><FONT SIZE=2>> > Fax. +498041 805-519</FONT>
<BR><FONT SIZE=2>> > ====================================================================</FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > </FONT>
<BR><FONT SIZE=2>> > -------------------------------------------------------</FONT>
<BR><FONT SIZE=2>> > This SF.NET email is sponsored by:</FONT>
<BR><FONT SIZE=2>> > SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See!</FONT>
<BR><FONT SIZE=2>> > <A HREF="http://www.vasoftware.com">http://www.vasoftware.com</A></FONT>
<BR><FONT SIZE=2>> > _______________________________________________</FONT>
<BR><FONT SIZE=2>> > Nagios-users mailing list</FONT>
<BR><FONT SIZE=2>> > Nagios-users@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>> > <A HREF="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</A></FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Wundere dich nicht daß du nicht ankommst, </FONT>
<BR><FONT SIZE=2>wenn du nicht weißt wo du hin willst.</FONT>
</P>
<P><FONT SIZE=2>====================================================================</FONT>
<BR><FONT SIZE=2>Fachhochschule Rosenheim</FONT>
<BR><FONT SIZE=2>Armin Irger</FONT>
<BR><FONT SIZE=2>Hochschulstr. 1</FONT>
<BR><FONT SIZE=2>D-83024 Rosenheim</FONT>
<BR><FONT SIZE=2>Tel. +498031 805-532</FONT>
<BR><FONT SIZE=2>Fax. +498041 805-519</FONT>
<BR><FONT SIZE=2>====================================================================</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>-------------------------------------------------------</FONT>
<BR><FONT SIZE=2>This SF.NET email is sponsored by:</FONT>
<BR><FONT SIZE=2>SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See!</FONT>
<BR><FONT SIZE=2><A HREF="http://www.vasoftware.com">http://www.vasoftware.com</A></FONT>
<BR><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Nagios-users mailing list</FONT>
<BR><FONT SIZE=2>Nagios-users@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2><A HREF="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</A></FONT>
</P>
</BODY>
</HTML>