I have installed nagios before in 4 different occasions and every one of it was successful with no issues. But the current install is bothering me a lot.
I am using RHEL 5.8 for use with Nagios Core 3.5 and Plugins at 1.4.16 which are current stable versions.
Pre Install Issues:bash-3.2# uname -a
Linux nagiosl851 2.6.18-308.16.1.el5 #1 SMP Tue Sep 18 07:21:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
bash-3.2# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
bash-3.2#
As per the installation steps the first step was to add a user and group called nagios and nagcmd. When i ran the command "useradd nagios" it came back and said the user exists and then immediately i looked in to the /etc/passwd file to see the user exists or not.. but it returned nothing. Instead of trying the same and failing, I started to use dpnagios and dpnagcmd as the user and group names.
New user and group detailsbash-3.2# useradd nagios
useradd: user nagios exists
bash-3.2# cat /etc/passwd | grep nagios
bash-3.2#
and then followed the next steps to install core with the right user and group names with the configure command. Everything went smooth and completed both the installation of Core and Plugins. When i noticed the /usr/local/nagios folder permissions they are all set to nagios and nagios. I went ahead and fired off the below 2 commands to fix the permissions.bash-3.2# cat /etc/passwd | grep dpnagios
dpnagios36135
:/home/dpnagios:/bin/bash
bash-3.2# cat /etc/group | grep nag
dpnagios36135:dpnagios,apache
dpnagcmd36136:dpnagios,apache
bash-3.2#
Post Install Issues:chown -Rv dpnagios nagios
chgrp -Rv dpnagios nagios
Now that site is up and running. Started to verify the nagios.cfg file and it came back with 0 errors/warnings.
Tried to start nagios and httpd and both came and said done.
But when i login in to the site, i get the error any page i try to view. the error page is attached to this thread.
Now when i try to see if nagios is running and it came back and said "not running". Now i am not sure what the issue is and any help on this is much appreciated. Let me know if i missed anything you need to help me or if i did something wrong.
cfg file check:
Nagios Start:bash-3.2# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
bash-3.2#
Again i did the same steps except user and group as nagios and nagcmd instead of dpnagios & dpnagcmd on centos 5.8 and the everything came back fine with no single issue. Any help on this issues i am seeing is much appreciated.bash-3.2# /etc/init.d/nagios start
Starting nagios:su: warning: cannot change directory to /home/dpnagios: No such file or directory
done.
bash-3.2# /etc/init.d/nagios status
nagios is not running
bash-3.2#
Thanks
Balu Gadikota