Page 1 of 1
nagios.cmd permission issue
Posted: Wed Dec 19, 2018 9:22 pm
by faridrossle
Hi Team,
Lately we have been facing issue where we keep getting this error when our L1 team tries to set scheduled downtime and applying the configuration from Nagios XI console.
As workaround, we have run reset_config_perms.sh and reconfigure_nagios.sh as temporary workaround when issue happen. But is there any potential cause as why this keeps on happening?
Re: nagios.cmd permission issue
Posted: Thu Dec 20, 2018 10:59 am
by lmiltchev
Is nagios.cmd being created as a pipe? Run the following command and show the output:
Code: Select all
ls -la /usr/local/nagios/var/rw/nagios.cmd
Are you using SNMP Traps on this machine? There was a bug in old versions of the snmptraphandling.py file which didn't check to make sure the file was a pipe before writing to it. Let's check to see if you have the required entry in this file:
Code: Select all
grep ISFIFO /usr/local/bin/snmptraphandling.py
Also, show the output of the following command:
Re: nagios.cmd permission issue
Posted: Wed Jan 30, 2019 1:39 am
by faridrossle
Hi, below is the requested output
Is nagios.cmd being created as a pipe? Run the following command and show the output:
CODE: SELECT ALL
ls -la /usr/local/nagios/var/rw/nagios.cmd
Code: Select all
root@hk1pnag1[~] # ls -la /usr/local/nagios/var/rw/nagios.cmd
prw-rw---- 1 nagios nagcmd 0 Jan 30 04:07 /usr/local/nagios/var/rw/nagios.cmd
Are you using SNMP Traps on this machine? There was a bug in old versions of the snmptraphandling.py file which didn't check to make sure the file was a pipe before writing to it. Let's check to see if you have the required entry in this file:
CODE: SELECT ALL
grep ISFIFO /usr/local/bin/snmptraphandling.py
We use NRPE agent, hence no snmp file available
Code: Select all
root@hk1pnag1[/] # grep ISFIFO /usr/local/bin/snmptraphandling.py
grep: /usr/local/bin/snmptraphandling.py: No such file or directory
Also, show the output of the following command:
CODE: SELECT ALL
grep nag /etc/group
Code: Select all
root@hk1pnag1[bin] # grep nag /etc/group
nagios:x:701:nagios,apache
nagcmd:x:702:nagios,apache
Re: nagios.cmd permission issue
Posted: Wed Jan 30, 2019 10:42 am
by lmiltchev
Are you experiencing this issue with one user only, some users or all users? How often does this happen?
Let's check a few more permissions - run the following command and show the output:
Code: Select all
ls -lad /usr/local/nagios /usr/local/nagios/var /usr/local/nagios/var/rw
Have you hardened this server or made any changes that could modify the "default" permissions? Is SELinux enabled? Please show the output of the commands below:
Code: Select all
grep nagios /etc/passwd
umask
sestatus
PM me or any other member of the Nagios Support team your profile.
Admin > System Config > System Profile > Download Profile