Error: Could not read host and service status information

James R. Marcus jmarcus at mvalent.com
Fri Aug 26 05:53:53 CEST 2005


Marc,
I did have to reinstall MySQL, but I did make sure all the dependencies
on Gentoo were dealt with, by recompiling (with emerge) Nagios, and used
a command that checks all .so dependencies on the system to make sure
nothing is broken.  So I'm not so worried about MySQL.

So I think that since Groundwork monitor is using its own database to
store the configuration data I don't think that the original Nagios
database, that I setup isn't being used.  So I'm not so sure about the
second question. Here is my config:



##########GROUNDWORK####################################################
#########################################
#GW
#GW     nagios.cfg generated 2005-08-24 17:03:18 by super_user from
monarch.cgi nagios 1.x
#GW
##########GROUNDWORK####################################################
#########################################
 
# LOG FILE
log_file=/var/nagios/nagios.log
 
# OBJECT CONFIGURATION FILE(S)
cfg_file=/etc/nagios/checkcommands.cfg
cfg_file=/etc/nagios/contact_templates.cfg
cfg_file=/etc/nagios/contactgroups.cfg
cfg_file=/etc/nagios/contacts.cfg
cfg_file=/etc/nagios/escalation_templates.cfg
cfg_file=/etc/nagios/escalations.cfg
cfg_file=/etc/nagios/host_templates.cfg
cfg_file=/etc/nagios/hostgroups.cfg
cfg_file=/etc/nagios/hosts.cfg
cfg_file=/etc/nagios/misccommands.cfg
cfg_file=/etc/nagios/service_templates.cfg
cfg_file=/etc/nagios/services.cfg
cfg_file=/etc/nagios/timeperiods.cfg
 
# RESOURCE FILE
resource_file=/etc/nagios/resource.cfg
 
# TEMP FILE
temp_file=/var/nagios/nagios.tmp
 
# STATUS FILE
status_file=/var/nagios/status.log
 
# AGGREGATE STATUS UPDATES
aggregate_status_updates=1
 
# STATUS UPDATE INTERVAL
status_update_interval=15
 
# NAGIOS USER
nagios_user=nagios
 
# NAGIOS GROUP
nagios_group=nagios
 
# ENABLE NOTIFICATIONS
enable_notifications=1
 
# EXECUTE SERVICE CHECKS
execute_service_checks=1
 
# ACCEPT PASSIVE SERVICE CHECKS
accept_passive_service_checks=1
 
# ENABLE EVENT HANDLERS
enable_event_handlers=1
 
# LOG ROTATION METHOD
log_rotation_method=d
 
# LOG ARCHIVE PATH
log_archive_path=/var/nagios/archives
 
# CHECK EXTERNAL COMMANDS
check_external_commands=0
 
# COMMAND CHECK INTERVAL
command_check_interval=1
 
# COMMAND FILE
command_file=/var/nagios/rw/nagios.cmd
 
# DOWNTIME FILE
downtime_file=/var/nagios/nagiosdowntime.log
 
# COMMENT FILE
comment_file=/var/nagios/nagioscomment.log
 
# LOCK FILE
lock_file=/var/nagios/nagios.lock
 
# RETAIN STATE INFORMATION
retain_state_information=0
 
# STATE RETENTION FILE
state_retention_file=/var/nagios/nagiosstatus.sav
 
# RETENTION UPDATE INTERVAL
retention_update_interval=60
 
# USE RETAINED PROGRAM STATE
use_retained_program_state=1
 
# USE SYSLOG
use_syslog=1
 
# LOG NOTIFICATIONS
log_notifications=1
 
# LOG SERVICE RETRIES
log_service_retries=1
 
# LOG HOST RETRIES
log_host_retries=1
 
# LOG EVENT HANDLERS
log_event_handlers=1
 
# LOG INITIAL STATES
log_initial_states=0
 
# LOG EXTERNAL COMMANDS
log_external_commands=1
 
# LOG PASSIVE SERVICE CHECKS
log_passive_service_checks=1
 
# GLOBAL HOST EVENT HANDLER
# global_host_event_handler=
 
# GLOBAL SERVICE EVENT HANDLER
# global_service_event_handler=
 
# SLEEP TIME
sleep_time=1
 
# INTER CHECK DELAY METHOD
inter_check_delay_method=s
 
# SERVICE INTERLEAVE FACTOR
service_interleave_factor=s
 
# MAX CONCURRENT CHECKS
max_concurrent_checks=0
 
# SERVICE REAPER FREQUENCY
service_reaper_frequency=10
 
# INTERVAL LENGTH
interval_length=60
 
# USE AGRESSIVE HOST CHECKING
use_agressive_host_checking=0
 
# ENABLE FLAP DETECTION
enable_flap_detection=0
 
# LOW SERVICE FLAP THRESHOLD
low_service_flap_threshold=25.0
 
# HIGH SERVICE FLAP THRESHOLD
high_service_flap_threshold=50.0
 
# LOW HOST FLAP THRESHOLD
low_host_flap_threshold=25.0
 
# HIGH HOST FLAP THRESHOLD
high_host_flap_threshold=50.0
 
# SOFT STATE DEPENDENCIES
soft_state_dependencies=0
 
# SERVICE CHECK TIMEOUT
service_check_timeout=60
 
# HOST CHECK TIMEOUT
host_check_timeout=30
 
# EVENT HANDLER TIMEOUT
event_handler_timeout=30
 
# NOTIFICATION TIMEOUT
notification_timeout=30
 
# OCSP TIMEOUT
ocsp_timeout=5
 
# PERFDATA TIMEOUT
perfdata_timeout=5
 
# OBSESS OVER SERVICES
obsess_over_services=0
 
# OCSP COMMAND
# ocsp_command=
 
# PROCESS PERFORMANCE DATA
process_performance_data=0
 
# HOST PERFDATA COMMAND
# host_perfdata_command=
 
# SERVICE PERFDATA COMMAND
# service_perfdata_command=
 
# CHECK FOR ORPHANED SERVICES
check_for_orphaned_services=1
 
# CHECK SERVICE FRESHNESS
check_service_freshness=0
 
# FRESHNESS CHECK INTERVAL
freshness_check_interval=60
 
# DATE FORMAT
date_format=us
 
# ILLEGAL OBJECT NAME CHARS
illegal_object_name_chars=`~!$%^&*|'"<>?,()'=
 
# ILLEGAL MACRO OUTPUT CHARS
illegal_macro_output_chars=`~$&|'"<>
 
# ADMIN EMAIL
admin_email=monitoring at domain.local
 
# ADMIN PAGER
# admin_pager=
ncheck ~ #  




-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Marc
Powell
Sent: Thursday, August 25, 2005 1:23 PM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Error: Could not read host and service
status information

Those look reasonable. Was apache restarted _after_ it was added to the
nagios group? If so, I'd start looking at the mysql end of things. Is it
possible that the version of mysql libraries nagios was compiled against
is different than the mysql server itself? When you start nagios, can
you perform selects on the tables in the database using the same
authentication as nagios and see the data?

--
Marc 

> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of James R. Marcus
> Sent: Thursday, August 25, 2005 8:58 AM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Error: Could not read host and service
status
> information
> 
> Gladly:
> 
> ncheck / # grep nagios /etc/group
> apache:x:81:nagios,monarch
> nagios:x:407:monarch,apache
> 
> 
> ncheck / # ls -al /etc/nagios/
> total 104
> drwxrwx---   2 nagios nagios 4096 Aug 24 08:09 .
> drwxr-xr-x  51 root   root   4096 Aug 24 18:24 ..
> -rw-r--r--   1 nagios nagios    0 Aug 16 17:28 .keep
> -rwxrwxr-x   1 nagios nagios 1887 Aug 24 17:03 cgi.cfg
> -rwxrwxr-x   1 nagios nagios 2690 Aug 24 17:03 checkcommands.cfg
> -rwxrwxr-x   1 nagios nagios 1381 Aug 24 17:03 contact_templates.cfg
> -rwxrwxr-x   1 nagios nagios  956 Aug 24 17:03 contactgroups.cfg
> -rwxrwxr-x   1 nagios nagios 1243 Aug 24 17:03 contacts.cfg
> -rwxrwxr-x   1 nagios nagios 1663 Aug 10 01:28 dependencies.cfg
> -rwxrwxr-x   1 nagios nagios  748 Aug 24 17:03
escalation_templates.cfg
> -rwxrwxr-x   1 nagios nagios  330 Aug 24 17:03 escalations.cfg
> -rwxrwxr-x   1 nagios nagios 1265 Aug 24 17:03 host_templates.cfg
> -rwxrwxr-x   1 nagios nagios  854 Aug 24 17:03 hostgroups.cfg
> -rwxrwxr-x   1 nagios nagios  687 Aug 24 17:03 hosts.cfg
> -rw-r--r--   1 root   root     15 Aug 18 18:20 htpasswd.group
> -rw-r--r--   1 root   root     21 Aug 18 18:18 htpasswd.users
> -rwxrwxr-x   1 nagios nagios 2418 Aug 24 17:03 misccommands.cfg
> -rwxrwxr-x   1 nagios nagios 4192 Aug 24 17:03 nagios.cfg
> -rwxrwxr-x   1 nagios nagios 3501 Aug 16 17:29 nrpe.cfg
> -rwxrwxr-x   1 nagios nagios 4960 Aug 18 18:09 nsca.cfg
> -rwxrwxr-x   1 nagios nagios 2981 Aug 10 14:10 resource.cfg
> -rwxrwxr-x   1 nagios nagios 1628 Aug 16 17:24 send_nsca.cfg
> -rwxrwxr-x   1 nagios nagios 4022 Aug 24 17:03 service_templates.cfg
> -rwxrwxr-x   1 nagios nagios  741 Aug 24 17:03 services.cfg
> -rwxrwxr-x   1 nagios nagios 1459 Aug 24 17:03 timeperiods.cfg
> 
> ncheck / # ls -l /var/nagios/
> total 20
> drwxr-xr-x  2 nagios nagios 4096 Aug 25 00:00 archives
> -rw-r--r--  1 root   apache    5 Aug 24 17:03 nagios.lock
> -rw-r--r--  1 nagios nagios   33 Aug 25 00:00 nagios.log
> -rw-r--r--  1 root   root      2 Aug 25 09:54 nagios_seek.tmp
> drwxr-xr-x  2 nagios apache 4096 Aug 16 17:28 rw
> -rw-r--r--  1 nagios nagios    0 Aug 24 17:03 status.sav
> 
> ncheck / # grep -i not /var/nagios/nagios.log
> ncheck / #
> 
> Apache2:
> 
> ###
> ### Nagios Stuff
> ###
> ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/
>  Alias /nagios/ /usr/nagios/share
> <Directory "/usr/nagios/sbin">
>     AllowOverride AuthConfig
>     Options +ExecCGI
>     Order allow,deny
>     Allow from all
> </Directory>
> 
> <Directory "/usr/nagios/share">
>     Options None
>     AllowOverride AuthConfig
>     Order allow,deny
>     Allow from all
> </Directory>
> 
> Thanks,
> James
> 
> 
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Marc
> Powell
> Sent: Thursday, August 25, 2005 12:03 AM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Error: Could not read host and service
> status information
> 
> Would you be willing to send ls -al's on ~nagios/etc and ~nagios/var
as
> well as the user/group that nagios and your web server run under? It
> does sound like it might be a permissions issue and another set of
eyes
> can't hurt. Additionally, do you see and 'could not update' errors in
> nagios.log?
> 
> --
> Marc
> 
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> > admin at lists.sourceforge.net] On Behalf Of James R. Marcus
> > Sent: Wednesday, August 24, 2005 9:18 PM
> > To: Lori Adams; nagios-users at lists.sourceforge.net
> > Subject: RE: [Nagios-users] Error: Could not read host and service
> status
> > information
> >
> > Hi,
> > Yes I have killed all the Nagios processes and restarted.  I don't
> have a
> > status.log, I have nagios.log, it was my understanding that when you
> use
> > mySQL and Nagios the status.log isn't written.  I have run nagios -v
> and
> > although I have had warnings, which I corrected,  nothing has really
> > changed.  I have double checked permissions.
> >
> > The other interesting thing to note is that according the log, it
> looks
> > like it is doing the checks correctly.
> >
> > I guess it is back to the doc :-)
> >
> > James
> >
> > ________________________________
> >
> > From: Lori Adams [mailto:ladams at cloudmark.com]
> > Sent: Wed 8/24/2005 6:08 PM
> > To: James R. Marcus; nagios-users at lists.sourceforge.net
> > Subject: RE: [Nagios-users] Error: Could not read host and service
> status
> > information
> >
> >
> >
> > Have you tried killing off all nagios processes?  Make sure there
are
> no
> > more, and then restart your nagios.
> >
> >
> >
> > Below is the error I get if nagios is not running. I assume you got
> this
> > entire message too.  Follow all instructions when setting up your
> nagios.
> > More specifically make sure that you have a status.log (see
> nagios.cfg).
> >
> >
> >
> > Did you try all of these steps?  Definitely try
> /your/nagios/dir/nagios -v
> > to make sure there's no errors.
> >
> >
> >
> > 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:
> >
> >
> >
> >             1. Check the Nagios log file for messages relating to
> startup
> > or status data errors.
> >
> >             2. Always verify configuration options using the -v
> command-
> > line option before starting or restarting Nagios!
> >
> > 3. Make sure you've compiled the main program and the CGIs to use
the
> same
> > status data storage options (i.e. text file or database). If the
main
> > program is storing status data in a text file and the CGIs are
trying
> to
> > read status data from a database, you'll have problems.
> >
> >
> >
> > 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 <http://www.nagios.org/> .
> >
> >
> >
> > -Lori
> >
> >
> >
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> > admin at lists.sourceforge.net] On Behalf Of James R. Marcus
> > Sent: Wednesday, August 24, 2005 12:39 PM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] Error: Could not read host and service
status
> > information
> >
> >
> >
> >
> >
> > I have been looking at old posts and the FAQ to find a solution to
> this
> >
> > issue:
> >
> >
> >
> > Error: Could not read host and service status information!
> >
> >
> >
> > All I get in my log file is:
> >
> > [1124913728] Warning: Contact group 'switch-admins' is not used in
any
> >
> > hostgroup/service definitions or host/hostgroup/service escalations!
> >
> > [1124913728] Warning: Contact group 'win-admins' is not used in any
> >
> > hostgroup/service definitions or host/hostgroup/service escalations!
> >
> > [1124913728] Finished daemonizing... (New PID=6184)
> >
> >
> >
> > I think I have done a pretty good job of reviewing permissions etc.
> >
> > There are no errors in the Apache2 logs.
> >
> >
> >
> > I'm running Gentoo, Nagios 1.2 and Monarch for configuration.
> >
> >
> >
> > Can anyone point me to a better way of troubleshooting this issue?
> >
> >
> >
> >
> >
> > Thanks,
> >
> > James
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> >
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> >
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > Practices
> >
> > Agile & Plan-Driven Development * Managing Projects & Teams *
Testing
> & QA
> >
> > Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> >
> > _______________________________________________
> >
> > Nagios-users mailing list
> >
> > Nagios-users at lists.sourceforge.net
> >
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> >
> > ::: Please include Nagios version, plugin version (-v) and OS when
> > reporting any issue.
> >
> > ::: Messages without supporting info will risk being sent to
/dev/null
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams *
Testing
> & QA
> > Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when
> > reporting any issue.
> > ::: Messages without supporting info will risk being sent to
/dev/null
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
&
> QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
> Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list