external commands
Chris Ditri
chrisd at better-investing.org
Fri Sep 6 17:54:43 CEST 2002
Hi.
I am having difficulty with getting external commands working. I swear I have
done everything it says to in the docs. This is what I have done:
I edited nagios.cfg and changed or added the following variables:
check_external_commands=1
command_check_interval=-1
command_file=/usr/local/nagios/var/rw/nagios.cmd
I had created a user named nagios at time of installation.
I created a group called nagiocmd.
I made sure that the user nagios was a member of the nagiocmd group:
usermod -G nagiocmd nagios
I made sure that the web-user was also a member of this group (in this case
that is user: apache):
usermod -G nagiocmd apache
Just to CMA, I made the nobody user a member:
usermod -G nagiocmd nobody
The directory /usr/local/nagios/var/rw already existed from install
I changed the ownership of that directory for user and group:
chown nagios.nagiocmd /usr/local/nagios/var/rw
I changed the perms on that directory:
chmod u+rwx /usr/local/nagios/var/rw
chmod g+rw /usr/local/nagios/var/rw
chmod g+s /usr/local/nagios/var/rw
I restarted both nagios and apache
Everytime I try to issue an external command, for example disable
notifications, I get the error:
Error: Could not stat() command file '/usr/local/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.
Return from whence you came
What the heck am I missing? I have done this on netsaint with no problems
what so ever, and it doesn't want to work here.
I did an ls -l on /usr/local/nagios/var/rw/nagios.cmd and got this:
prw-rw---- 1 nagios nagiocmd 0 Sep 6 10:28 nagios.cmd
Is that normal?
One interesting thing I found was that when I do an ls -ld on
/usr/local/nagios/var/rw I get this:
drwxrwS--- 2 nagios nagiocmd 4096 Sep 6 10:28
/usr/local/nagios/var/rw
I noticed the capital "S"... I don't ever rembmer that being capitol... could
that be it? I don't know why it is capitalized, it never was before when I
excuted that command (I don't think). I tried as well with chmod 2760 rw as
well, same deal. I even set all perms to 000, and started over, still the
same.
I have read the docs a half dozen times here, and at least tripple checked
everything.... What the heck am I missing?
Thank you!
Chris
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
More information about the Users
mailing list