Nagios UI reports server Up - False positive

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.
tezarin
Posts: 32
Joined: Tue Apr 07, 2015 8:03 am

Re: Nagios UI reports server Up - False positive

Post by tezarin »

jolson wrote:
nagios:x:408:408::/var/spool/nagios:/sbin/nologin
Would you mind changing the nagios users shell to /bin/bash?
nagios:x:408:408::/var/spool/nagios:/bin/bash
It's somewhat interesting that you don't have a 'nagcmd' group - but that shouldn't be a problem if nagios without that setting.
Let's check permissions on a few files:

Code: Select all

ls -l /usr/local/nagios/var/rw/
Do any of the files in that directory have 'nagcmd' as the group? If so, we should create that group and add nagios+apache to it.

After these changes, can you switch user to nagios and run the ping command as described?

Best,


Jesse
Thanks for your reply. I tried that command but it didn't return anything:

Code: Select all

[root@nagios ~]# ls -l /etc/nagios/var/rw/
ls: cannot access /etc/nagios/var/rw/: No such file or directory
How can I change that nagios users shell to /bin/bash? Wouldn't it break something?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios UI reports server Up - False positive

Post by jolson »

This should do the trick:

Code: Select all

usermod -s /bin/bash nagios
If it impacts functionality, you can always switch it back:

Code: Select all

usermod -s /sbin/nologin nagios
To find any files with the group 'nagcmd':

Code: Select all

find /. -group nagcmd
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
tezarin
Posts: 32
Joined: Tue Apr 07, 2015 8:03 am

Re: Nagios UI reports server Up - False positive

Post by tezarin »

jolson wrote:This should do the trick:

Code: Select all

usermod -s /bin/bash nagios
If it impacts functionality, you can always switch it back:

Code: Select all

usermod -s /sbin/nologin nagios
To find any files with the group 'nagcmd':

Code: Select all

find /. -group nagcmd
Thanks for your reply. No group was found by that name. Will look into adding nagios to the /bin/bash.

Thanks much
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios UI reports server Up - False positive

Post by jolson »

Sounds good - the group is likely set to 'nagios' instead of 'nagcmd'. Please do look into changing the shell - let us know what you find out.

Jesse
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
tezarin
Posts: 32
Joined: Tue Apr 07, 2015 8:03 am

Re: Nagios UI reports server Up - False positive

Post by tezarin »

Maybe it's set to nagios, will have to check for that but since the check_tcp commands is working right now I probably wouldn't change a thing for now so it doesn't break! :-)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios UI reports server Up - False positive

Post by abrist »

Alright. Let us know if you have issues!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked