nagios.cmd permission issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
faridrossle
Posts: 4
Joined: Fri Aug 24, 2018 3:04 am

nagios.cmd permission issue

Post 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?
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios.cmd permission issue

Post 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:

Code: Select all

grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
faridrossle
Posts: 4
Joined: Fri Aug 24, 2018 3:04 am

Re: nagios.cmd permission issue

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios.cmd permission issue

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked