I'm having a little trouble with Nagios starting up correcly.
Right after a reboot of my server, if I try to execute a manual service check I get:
Error: Could not stat() command file '/var/nagios/rw/nagios.cmd'!
But if I simply restart the nagios service, I can complete the manual service check without issue.
This happens after EVERY reboot. Now I could simply restart nagios after every reboot, but I'd really like to solve this permanently.
When I run: ls -al /var/nagios/rw
I get the following results:
drwxrwsrwx 2 nagios nagiocmd 4096 Mar 16 01:24 .
drwxrwxr-x 5 nagios nagios 4096 Mar 16 01:29 ..
After running: service nagios restart
Then running: ls -al /var/nagios/rw
drwxrwsrwx 2 nagios nagiocmd 4096 Mar 16 01:31 .
drwxrwxr-x 5 nagios nagios 4096 Mar 16 01:32 ..
srw-rw---- 1 nagios nagiocmd 0 Mar 16 01:31 live
prw-rw---- 1 nagios nagiocmd 0 Mar 16 01:32 nagios.cmd
after the nagios service restart nagios.cmd file shows up in the directory.
I following the instructions on this site:
http://nagios.manubulon.com/traduction/ ... dfile.html
I know this error is a common one and typically pertains to permissions, but I have tried reseting and even adding the nagiocmd group, but nothing has helped thus far.
Thanks for the assistance!
Error: Could not stat() command file '/var/nagios/rw/nagios.
-
amc_oldsarge
- Posts: 7
- Joined: Mon Jul 16, 2012 2:50 pm
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Error: Could not stat() command file '/var/nagios/rw/nag
This is because nagios isn't running yet. The following files are created when nagios starts
Code: Select all
srw-rw---- 1 nagios nagiocmd 0 Mar 16 01:31 live
prw-rw---- 1 nagios nagiocmd 0 Mar 16 01:32 nagios.cmd