Please help me in configuring Nagios

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.
Locked
rags
Posts: 3
Joined: Thu Apr 10, 2014 8:02 am

Please help me in configuring Nagios

Post by rags »

Hi Teams,

I had followed the below steps to configure nagios

1) Prerequisites
After installing your CentOS/RHEL server, you have to install dependent packages to make nagios work.
yum install httpd php gcc glibc glibc-common gd gd-devel openssl-devel
2) Create nagios user and group by which we will be installing nagios
useradd -m nagios
passwd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache
3) Installation
a) Create a directory where you would download nagios software:

mkdir /opt/nagios
cd /opt/nagios
b) Download nagios-core package/Untar/Compile and Install all necessary files for Nagios:

wget http://sourceforge.net/projects/nagios/ ... ta1.tar.gz
tar -xzvf nagios-4.0.0-beta1.tar.gz
cd nagios
./configure --with-command-group=nagcmd --with-httpd-conf=/etc/httpd/conf.d --with-init-dir=/etc/init.d/
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
make install-exfoliation
Note: By default nagios install itself in /usr/local/nagios
c) Create a password to log into the web interface:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
d) Restart the httpd server:

service httpd restart
e) Now we have to make nagios service to start automatically on boot using chkconfig:

chkconfig --add nagios
chkconfig nagios on
f) Verify if you have a good config of nagios with the command:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
g) Check if there are no errors displayed; then start nagios with command:

service nagios start
h) Now, we have to Download/Untar/Compile and Install all necessary files for Nagios-Plugin:

cd /opt/nagios
wget http://prdownloads.sourceforge.net/sour ... .16.tar.gz
cd nagios-plugins-1.4.16
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

i) service iptables stop


But when i try to open the ngios via the browser, i am getting 404 error. Please help me in resolving the issue.
Thanks in advance.

Please let me know if you require more details.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Please help me in configuring Nagios

Post by slansing »

Can you try to access the web interface while running:

Code: Select all

tail -f /var/log/httpd/error_log
And share the output here?

Do you have any other web based applications running on this server?
Locked