Nagios Core Error

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.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Nagios Core Error

Post by venkatklr »

Hi Friends,

I have installed Nagios core on CentOS 7 and web page is opening with error "Nagios core not running"and also when I click on Hosts, getting "Error: Could not read object configuration data!" Can some one help me how to fix it.

Thanks,
Venkat
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios Core Error

Post by jdalrymple »

When you installed, did you disable selinux as a first step?

Post the output of the following 2 commands:

Code: Select all

[jdalrymple@localhost ~]$ ls -l /usr/local/nagios/var
[jdalrymple@localhost ~]$ ls -l /usr/local/nagios/var/rw
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Nagios Core Error

Post by venkatklr »

I have installed it today.

Please refer the attachment.

Please reach me @ *** DO NOT POST PERSONAL EMAIL ADDRESSES *** for more information.

Thank you for support.
Attachments
logs.docx
Logs
(26.32 KiB) Downloaded 160 times
Last edited by venkatklr on Tue Jun 23, 2015 9:31 am, edited 1 time in total.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios Core Error

Post by jolson »

It looks like you're missing the 'rw' directory. Unless I'm missing something, this is likely an indication of an improper installation. You will need to disable SELinux and reinstall for a quick resolution.

Please ensure that SELinux is disabled on the target system:

Code: Select all

sestatus
Install all pre-requisite packages:

Code: Select all

yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp unzip automake

Download Nagios Core and Nagios Plugins Tarballs

Code: Select all

cd /tmp
wget https://github.com/NagiosEnterprises/nagioscore/archive/master.tar.gz -O nagioscore.tar.gz
wget https://github.com/nagios-plugins/nagios-plugins/archive/master.tar.gz -O nagiosplugins.tar.gz

Add Nagios User and Group

Code: Select all

useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

Nagios Core Installation

Code: Select all

tar xzf nagioscore.tar.gz
tar xzf nagiosplugins.tar.gz
Change to the Nagios Core directory:

Code: Select all

cd nagioscore-master
Run the configure command to get the source code ready for compilation:

Code: Select all

./configure --with-command-group=nagcmd
Compile and install:

Code: Select all

make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
Complete the installation:

Code: Select all

cp -R contrib/eventhandlers /usr/local/nagios/libexec
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
Run the Nagios verification command to ensure the install completed properly, and start Nagios:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios start

Create a Default User for Web Access

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
systemctl start httpd

Nagios Plugin Installation

Code: Select all

cd /tmp/nagios-plugins-master/
./tools/setup
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

Nagios Service Setup

Code: Select all

chkconfig --add nagios
chkconfig --level 35 nagios on
systemctl enable httpd
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.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Nagios Core Error

Post by venkatklr »

I don't have much knowledge on Linux, please tell me how to disable it and please send me installation steps in doc format Please.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios Core Error

Post by jolson »

To disable SELinux, type the following command as root on the CLI:

Code: Select all

sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/sysconfig/selinux && sed -i s/SELINUX=permissive/SELINUX=disabled/ /etc/sysconfig/selinux
After the above command has been typed, reboot your server. Once the server has been rebooted, simply follow the above instructions line-by-line and that's all you will need to do to have a fully functional core install.
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.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Nagios Core Error

Post by venkatklr »

Thanks for the info. I will follow these steps and let you know if I face any issue.

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

Re: Nagios Core Error

Post by jolson »

Let us know what you find out. Thanks Venkat.
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.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Nagios Core Error

Post by venkatklr »

It is working now. I really appreciate for your time and support to resolve this issue. Now I want to know how to add host in Nagios to monitor, kindly share if any documents available or steps to get this done.

Thanks,
Venkat
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios Core Error

Post by Box293 »

This links to a guide that should help:

http://nagios.sourceforge.net/docs/nagi ... ndows.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked