Page 2 of 2
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Wed Apr 24, 2013 5:43 pm
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.
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Thu Apr 25, 2013 12:45 pm
by abrist
lets check your group settings:
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Thu Apr 25, 2013 5:21 pm
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#
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Fri Apr 26, 2013 10:24 am
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%
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Fri Apr 26, 2013 12:33 pm
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$
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Fri Apr 26, 2013 3:18 pm
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?
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Fri Apr 26, 2013 10:18 pm
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.
Re: Pre/Post Install problems with nagios Core on RHEL 5.8
Posted: Sun Apr 28, 2013 1:38 pm
by scottwilkerson
please run
Code: Select all
cat /usr/local/nagios/etc/nagios.cfg |grep status_file