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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
arnob
Posts: 1
Joined: Wed Jul 28, 2021 10:32 am

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

Post by arnob »

Hi, I'm a newbie. I'm getting the error as below in nagios core UI. This error isn't new and is well known.
error screenshot
error screenshot
Platform: RHEL 8 (Server hosted in AWS EC2)

I have gone through https://support.nagios.com/forum/viewto ... =7&t=27662

Code: Select all

[root@Nagios-Master ~]# ll /usr/local/nagios/var/rw/
total 0
prw-rw----. 1 nagios nagcmd 0 Jul 27 19:14 nagios.cmd
srw-rw----. 1 nagios nagcmd 0 Jul 27 19:14 nagios.qh

[root@Nagios-Master ~]# grep nag /etc/group
nagios:x:1003:nagios
nagcmd:x:1004:apache
[root@Nagios-Master ~]#
I have already tried executing the commands as below:

Code: Select all

usermod -G nagcmd nagios
usermod -G nagcmd apache
service httpd restart
service nagios restart
Also the files under /usr/local/nagios/var/rw/ disappears if nagios is stopped and reappears when nagios is started back up. Maybe this is an expected behaviour.

Nothing has helped resolved this issue so far. Is there anything else I could try?

By the way I have also tried providing full permission:

Code: Select all

 chmod 777 nagios.cmd 
. Still no luck :cry:

Thanks in Advance! I appreciate your help and feedbacks.
Locked