Page 1 of 1

Could not stat() command file '/usr/local/nagios/var/

Posted: Mon Jan 30, 2017 9:57 pm
by thejrose1984
Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =7&t=27662
In the future, please create a new thread and link to the old one instead of adding on.


I am having the same issue

OS = CentOS 7
Nagios = 4.2.4

Code: Select all

[rosekp@ops-yum-mon01 ~]$ sudo su - nagios
Last login: Mon Jan 30 21:44:36 EST 2017 on pts/0
-sh-4.2$ grep nag /etc/passwd
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
nagios:x:1003:1004::/home/nagios:/bin/sh
nagcmd:x:1004:1005::/home/nagcmd:/bin/bash
-sh-4.2$ grep nag /etc/group
apache:x:48:nagios
nagios:x:1004:
nagcmd:x:1005:nagios
-sh-4.2$ ls -l /usr/local/nagios/var/rw/
total 0
prw-rw----. 1 nagios nagcmd 0 Jan 30 21:54 nagios.cmd
srw-rw----. 1 nagios nagcmd 0 Jan 30 21:54 nagios.qh
I have followed the instructions from http://linux.101hacks.com/unix/nagios-cmd-file-error/ but it didn't fix the issue.

Re: Could not stat() command file '/usr/local/nagios/var/

Posted: Tue Jan 31, 2017 3:13 pm
by mcapra
Can you share the output of the following commands executed from the CLI of your Nagios Core machine:

Code: Select all

ps aux | grep nagios
cat /usr/local/nagios/etc/nagios.cfg | grep nagios_