Pre/Post Install problems with nagios Core on RHEL 5.8

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.
gadikota
Posts: 9
Joined: Sun Apr 15, 2012 1:30 am

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by gadikota »

Code: Select all

bash-3.2# ls -la /usr/local/nagios/var/nagios.lock
-rw-r--r-- 1 dpnagios dpnagios 0 Apr 23 20:08 /usr/local/nagios/var/nagios.lock
bash-3.2#
dpnagios for sure has permissions set to be able to write to it.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by abrist »

lets check your group settings:

Code: Select all

cat /etc/group|grep nag
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.
gadikota
Posts: 9
Joined: Sun Apr 15, 2012 1:30 am

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by gadikota »

Here you go

Code: Select all

bash-3.2# cat /etc/group | grep nag
dpnagios:x:36135:dpnagios,apache
dpnagcmd:x:36136:dpnagios,apache
bash-3.2#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by abrist »

Lets try running a check from the cli, masquerading as user dpnagios:

Code: Select all

su dpnagios
cd /usr/local/nagios/libexec
./check_ping  -H localhost -w 25,20% -c 50,40%
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.
gadikota
Posts: 9
Joined: Sun Apr 15, 2012 1:30 am

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by gadikota »

Results :

Code: Select all

bash-3.2# su dpnagios
bash-3.2$ cd /usr/local/nagios/libexec
bash-3.2$ ./check_ping  -H localhost -w 25,20% -c 50,40%
PING OK - Packet loss = 0%, RTA = 0.03 ms|rta=0.034000ms;25.000000;50.000000;0.000000 pl=0%;20;40;0
bash-3.2$
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by scottwilkerson »

Can you verify the existence of a status.dat file

Code: Select all

ls -l /usr/local/nagios/var/status.dat
Also, can you verify that your cgi.cfg has the correct path to your main.cfg

I want to point out that using different usernames for the nagios user and the fact that for whatever reason your system already had nagios users makes troubleshooting this quite difficult.

Do you know why your server had these users setup before?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gadikota
Posts: 9
Joined: Sun Apr 15, 2012 1:30 am

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by gadikota »

Code: Select all

bash-3.2# ls -l /usr/local/nagios/var/status.dat
ls: /usr/local/nagios/var/status.dat: No such file or directory
bash-3.2#
the user "nagios" doesnt exist on the system. But still when we run useradd, it complains that the user exists. Please see below.

Code: Select all

bash-3.2# bash-3.2# cat /etc/passwd | grep "^nagios"
bash-3.2# cat /etc/group | grep "^nagcmd"
bash-3.2# /usr/sbin/useradd -m nagios
useradd: user nagios exists
bash-3.2# cat /etc/passwd | grep nagios
dpnagios:x:36135:36135::/dpstore/localhome/dpnagios:/bin/bash  --> here it only shows the user dpnagios which i used to install nagios and never the user "nagios" which it says exists.
bash-3.2#
Not sure why this is happening and also not sure if the server is configured to check the AD or NIS before creating the local user.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Pre/Post Install problems with nagios Core on RHEL 5.8

Post by scottwilkerson »

please run

Code: Select all

cat /usr/local/nagios/etc/nagios.cfg |grep status_file
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked