SOLVED Schedule An Immediate Check - I have r tfmand stfw no help

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Fri Feb 7 19:58:39 CET 2003


That's great that it worked for Armin, but it's not the prescribed approach:

http://nagios.sourceforge.net/docs/1_0/commandfile.html

jc
-----Original Message-----
From: Richard Gross [mailto:rich at vel.net]
Sent: Friday, February 07, 2003 11:54 AM
Cc: nagios-users at lists.sourceforge.net
Subject: RE: SOLVED [Nagios-users] Schedule An Immediate Check - I have
rtfmand stfw no help


Awsome job Armin, that was bugging me too and you solved it! 
                                                        richg 
-----Original Message----- 
From: Armin Irger [mailto:irger at fh-rosenheim.de] 
Sent: Friday, February 07, 2003 8:29 AM 
To: Marc Powell 
Cc: nagios-users at lists.sourceforge.net; nagios at nagios.org 
Subject: SOLVED [Nagios-users] Schedule An Immediate Check - I have 
rtfmand stfw no help 


At the first time i changed the permissions by hand, but after a restart 
from nagios the problem appears because. 

1. After the restart from nagios he creates the nagios.cmd like this. 
prw-rw----    1 nagios   nagios          0 Feb  7 17:11 nagios.cmd 

2. The apache runs under nobody and if you follow the installation 
descriped on the "External Command File Permission" you add nobody to 
the nagiocmd group, and with the chown nagios.nagiocmd you give the 
rw-rights to the nagiocmd group. 
The apache can access the nagios/var/rw directory but he can't access 
the nagios.cmd, which is regenerated by a every restart of nagios, 
because nagios creates the nagios.cmd like above. 

3. I make a chgrp nagios.nagios to the nagios/var/rw directory and added 
nobody back do the nagios group with usermod -G nagios nobody. 

4. After every reboot nagios starts in the right way. 

------ 
Armin 


On Fri, 2003-02-07 at 16:25, Marc Powell wrote: 
> Assuming that your apache installation runs as group 'nobody', what do 
> the permissions on the directories above /opt/nagios/var/rw look like? 
> If /opt/nagios were chmod 600, then the web server would not be able to 
> read rw, etc... You also might want to try restarting your web server 
> just in case. 
> 
> -- 
> Marc 
> 
> > -----Original Message----- 
> > From: Armin Irger [mailto:irger at fh-rosenheim.de] 
> > Sent: Friday, February 07, 2003 9:05 AM 
> > To: nagios-users at lists.sourceforge.net 
> > Subject: [Nagios-users] Schedule An Immediate Check - I have rtfm and
stfw 
> > no help 
> > 
> > Hi, 
> > i using debian woody 3.0r1 and compiled nagios from the source. Nagios 
> > is "jailed" in /opt/nagios-1.0 and accessing over a link /opt/nagios. 
> > 
> > nagios.cfg settings: 
> > 
> >    check_external_commands=1 
> >    command_check_interval=-1 
> >    command_file=/opt/nagios/var/rw/nagios.cmd 
> > 
> > I setup the nagios.cmd file how it be descripted in the commandfile.html

> > /usr/sbin/groupadd nagiocmd 
> > /usr/sbin/usermod -G nagiocmd nagios 
> > /usr/sbin/usermod -G nagiocmd nobody 
> > mkdir /opt/nagios/var/rw 
> > chown nagios.nagiocmd /opt/nagios/var/rw 
> > chmod u+rwx /opt/nagios/var/rw 
> > chmod g+rw /opt/nagios/var/rw 
> > chmod g+s /opt/nagios/var/rw 
> > 
> > The ls -l /opt/nagioss/var/ looks like 
> > drwxrwSr--    2 nagios   nagiocmd     4096 Feb  7 15:10 rw 
> > 
> > 
> > cgi.cfg settings: 
> > authorized_for_system_information=nagiosadmin 
> > authorized_for_configuration_information=nagiosadmin 
> > authorized_for_system_commands=nagiosadmin 
> > authorized_for_all_hosts=nagiosadmin,guest 
> > authorized_for_all_service_commands=nagiosadmin 
> > authorized_for_all_host_commands=nagiosadmin 
> > 
> > 
> > I'am logged in as nagiosadmin and when i try to start a "Schedule an 
> > immediate check of all services on this host" from the Host Command's i 
> > get this error back after i commit the command. 
> > 
> > Error: Could not stat() command file '/opt/nagios/var/rw/nagios.cmd'! 
> > 
> > The external command file may be missing, Nagios may not be running, 
> > and/or Nagios may not be checking external commands. 
> > 
> > An error occurred while attempting to commit your command for 
> > processing. 
> > 
> > 
> > Greetings 
> > Armin 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > Wundere dich nicht daß du nicht ankommst, 
> > wenn du nicht weißt wo du hin willst. 
> > 
> > ==================================================================== 
> > Fachhochschule Rosenheim 
> > Armin Irger 
> > Hochschulstr. 1 
> > D-83024 Rosenheim 
> > Tel. +498031 805-532 
> > Fax. +498041 805-519 
> > ==================================================================== 
> > 
> > 
> > 
> > ------------------------------------------------------- 
> > This SF.NET email is sponsored by: 
> > SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See! 
> > http://www.vasoftware.com 
> > _______________________________________________ 
> > Nagios-users mailing list 
> > Nagios-users at lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/nagios-users 
-- 
Wundere dich nicht daß du nicht ankommst, 
wenn du nicht weißt wo du hin willst. 
==================================================================== 
Fachhochschule Rosenheim 
Armin Irger 
Hochschulstr. 1 
D-83024 Rosenheim 
Tel. +498031 805-532 
Fax. +498041 805-519 
==================================================================== 



------------------------------------------------------- 
This SF.NET email is sponsored by: 
SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See! 
http://www.vasoftware.com 
_______________________________________________ 
Nagios-users mailing list 
Nagios-users at lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/nagios-users 


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list