Error: Could not read host and service status information!

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
jai
Posts: 1
Joined: Thu Dec 26, 2013 1:23 am

Error: Could not read host and service status information!

Post by jai »

I have installed Nagios Core Version 4.0.2 on CentOS 64 BIT, upon installation I am getting the following error when I am checking for the hosts.
Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:


Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.
I have tried deleting the the files

Code: Select all

rm -rf  /var/lock/subsys/nagios
rm -rf /usr/local/nagios/var/nagios.lock
and restart the nagios service and encountering the following error when I am trying to bring the service up.
nagios dead but subsys locked
In the log I have noticed the following error's,
Error: Module loading failed. Aborting.
Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/bin/ndomod.o: undefined symbol: servicedependency_list

any pointers to fix this.

Regards
Jai
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Error: Could not read host and service status informatio

Post by scottwilkerson »

I noticed you are running Core 4.0.2. Did you pull down the 2.0 branch of ndo2db and compile it? this will be required, and should be still considered beta as a release has not been created for it yet...

You'll need a script something like this (directory paths may be different)

Code: Select all

#!/bin/sh
    yum install -y git
    
	rm -rf ndoutils
    
	# get ndo svn
    echo "Getting ndoutils 2.0 from version control..."
    git clone git://git.code.sf.net/p/nagios/ndoutils ndoutils
    
    #compile ndo
    cd ndoutils
    git checkout -b ndoutils-2-0 origin/ndoutils-2-0
    ./configure; make; make install
    cp -f src/ndomod-4x.o /usr/local/nagios/bin/ndomod.o
    # Copy 4.x daemon
    cp -f src/ndo2db-4x /usr/local/nagios/bin/ndo2db
    # Copy utilities
    cp -f src/file2sock /usr/local/nagios/bin/
    cp -f src/log2ndo /usr/local/nagios/bin/
    cp -f src/sockdebug /usr/local/nagios/bin/

    ##parse values in case mysql is offloaded 
    ndopass=$(sed -n '/^db_pass=/ s///p' /usr/local/nagios/etc/ndo2db.cfg)
    ndohost=$(sed -n '/^db_host=/ s///p' /usr/local/nagios/etc/ndo2db.cfg)
    ndouser=$(sed -n '/^db_user=/ s///p' /usr/local/nagios/etc/ndo2db.cfg)

	echo "Upgrading DB"
    (
        cd db
        ./upgradedb -u "$ndouser" -p "$ndopass" -h "$ndohost" -d nagios
    )
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
anubhav65
Posts: 6
Joined: Fri Jan 03, 2014 5:57 am

Re: Error: Could not read host and service status informatio

Post by anubhav65 »

Hi ...even I am experiencing the same issue ....what I m getting in the nagios.log file is
"Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/bin/ndomod.o: undefined symbol: servicedependency_list
[1388670653] Error: Failed to load module '/usr/local/nagios/bin/ndomod.o'.
[1388670653] Error: Module loading failed. Aborting.
[nagios@localhost var]$ ^C
[nagios@localhost var]$ Error: Could not load module '/usr/local/nagios/bin/ndomod.o' -> /usr/local/nagios/bin/ndomod.o: undefined symbol: servicedependency_list
-bash: Error:: command not found
"

plz can u catch me up what shall I do.....?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error: Could not read host and service status informatio

Post by abrist »

You must use the v2.0 branch of ndo2db in order to use ndo with core 4. Please read Scott's post above.
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.
Locked