Error: Could not read host and service status information! - Nagios

Danny Russell drussell at mpifix.com
Sat May 7 01:02:17 CEST 2005


I had tried that, no luck. Still broken. Also when I go to the View
Config section I get this error:

It appears as though you do not have permission to view the
configuration information you requested...

If you believe this is an error, check the HTTP server authentication
requirements for accessing this CGI
and check the authorization options in your CGI configuration file.

 

 

Any other thoughts?

 

________________________________

From: Dywer Santos -- Barcelo Hotels
[mailto:d.santos at barcelohotels.com.do] 
Sent: Friday, May 06, 2005 5:01 PM
To: Danny Russell; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Error: Could not read host and service
status information! - Nagios

 

Try this in the cgi configuration file:

 

use_authentication=0 

 you will disable authentication for the cgi's 

 

If it works, It means that you must configure user authentication for
the cgi's to execute.

 

Dywer Santos.

	-----Mensaje original-----
	De: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]En nombre de Danny
Russell
	Enviado el: Friday, May 06, 2005 5:26 PM
	Para: nagios-users at lists.sourceforge.net
	Asunto: [Nagios-users] Error: Could not read host and service
status information! - Nagios

	Hello,

	 

	I am having a little difficulty getting Nagios working 100%. My
box is CentOS 4.0. All packages are up to date. I installed the
following to get Nagios to install via RPM:

	*         nagios-1.2-2.2.el4.rf.i386.rpm

	*         nagios-plugins-1.4-2.2.el4.rf.i386.rpm

	*         fping-2.4-1.b2.2.el4.rf.i386.rpm

	*         perl-Crypt-DES-2.03-3.2.el4.rf.i386.rpm

	*         perl-IO-Socket-INET6-2.51-1.2.el4.rf.noarch.rpm

	*         perl-Net-SNMP-5.0.1-1.2.el4.rf.noarch.rpm

	*         perl-Socket6-0.18-1.2.el4.rf.i386.rpm

	 

	My problem is that the web cgi pages are not working. On all the
pages under the monitoring section I am getting:


	Whoops!


	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. 

	My log files show that things are being pinged correctly and are
a success:

	[root at scp nagios]# tail /var/log/nagios/status.log

	# Nagios 1.2 Status File

	[1115414560] PROGRAM;1115414530;18051;1;0;0;1;1;1;1;0;0;1;0

	[1115414560]
HOST;brentbrown;UP;1115414386;1115401491;0;13027;0;0;0;0;1;1;1;1;0;0.00;
0;1;1;PING OK - Packet loss = 0%, RTA = 25.41 ms

	[1115414560]
HOST;techops_lab;UP;1115414476;1115401686;0;12672;0;0;0;0;1;1;1;1;0;0.00
;0;1;1;PING OK - Packet loss = 0%, RTA = 63.46 ms

	[1115414560] SERVICE;brentbrown;Netscreen
Ping;PENDING;0/3;HARD;0;1115414620;ACTIVE;1;1;1;0;0;OK;0;0;0;0;0;0;1;0;0
;1;0;0.0;0;1;1;1;Service check scheduled for Fri May  6 15:23:40 2005

	[1115414560] SERVICE;techops_lab;Netscreen
Ping;PENDING;0/3;HARD;0;1115414710;ACTIVE;1;1;1;0;0;OK;0;0;0;0;0;0;1;0;0
;1;0;0.0;0;1;1;1;Service check scheduled for Fri May  6 15:25:10 2005

	[root at scp nagios]#

	 

	The nagios daemon is running:

	[root at scp nagios]# service nagios status

	NAGIOS ok - status written 10 seconds ago

	[root at scp nagios]#

	 

	 

	 

	 

	In /etc/nagios I have the following cfg files:

	-rw-rw-r--  1 root root   17144 Apr 10 11:12 cgi.cfg

	-rw-rw-r--  1 root root    4475 Apr 10 11:12 checkcommands.cfg

	-rw-r--r--  1 root root   15766 Mar  4 22:39 command-plugins.cfg

	-rw-rw-r--  1 root root     873 May  6 11:39 contactgroups.cfg

	-rw-rw-r--  1 root root    2009 May  6 11:04 contacts.cfg

	-rw-rw-r--  1 root root    1662 May  6 11:43 dependencies.cfg

	-rw-rw-r--  1 root root    1508 May  6 11:42 escalations.cfg

	-rw-rw-r--  1 root root    1907 May  6 11:30 hostgroups.cfg

	-rw-rw-r--  1 root root    5938 May  6 11:44 hosts.cfg

	-rw-rw-r--  1 root root   13583 Apr 10 11:12 minimal.cfg

	-rw-rw-r--  1 root root    4234 Apr 10 11:12 misccommands.cfg

	-rw-rw-r--  1 root root   21163 Apr 10 11:12 nagios.cfg

	drwxr-xr-x  2 root nagios  4096 May  6 14:49 private

	-rw-rw-r--  1 root root    2421 May  6 13:37 services.cfg

	-rw-r--r--  1 root root   18387 May  6 11:36 services.cfg.orig

	-rw-rw-r--  1 root root    1589 Apr 10 11:12 timeperiods.cfg

	 

	I have three entries in my hosts.cfg. The template and 2 hosts:

	# Generic host definition template

	define host{

	        name                            generic-host    ; The
name of this host template - referenced in other host definitions, used
for template recursion/resolution

	        notifications_enabled           1       ; Host
notifications are enabled

	        event_handler_enabled           1       ; Host event
handler is enabled

	        flap_detection_enabled          1       ; Flap detection
is enabled

	        process_perf_data               1       ; Process
performance data

	        retain_status_information       1       ; Retain status
information across program restarts

	        retain_nonstatus_information    1       ; Retain
non-status information across program restarts

	 

	        register                        0       ; DONT REGISTER
THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!

	        }

	 

	# 'techops_lab' host definition

	define host{

	        use                     generic-host            ; Name
of host template to use

	 

	        host_name               techops_lab

	        alias                   Techops Lab in Orem

	        address                 38.119.177.149

	        check_command           check-host-alive

	        max_check_attempts      10

	        notification_interval   1

	        notification_period     24x7

	        notification_options    d,u,r

	        }

	 

	 

	# 'brentbrown' host definition

	define host{

	        use                     generic-host            ; Name
of host template to use

	 

	        host_name               brentbrown

	        alias                   Brent Brown

	        address                 65.73.113.60

	        check_command           check-host-alive

	        max_check_attempts      10

	        notification_interval   1

	        notification_period     24x7

	        notification_options    d,u,r

	        }

	 

	I have one hostgroup in my hostgroup.cfg:

	# 'netscreen' host group definition

	define hostgroup{

	        hostgroup_name  netscreens

	        alias           Netscreens

	        contact_groups  nsadmins

	        members         techops_lab,brentbrown

	        }

	 

	 

	I have created myself as a contact in contacts.cfg:

	# 'Danny Russell' contact definition

	define contact{

	        contact_name                    drussell

	        alias                           Danny Russell

	        service_notification_period     24x7

	        host_notification_period        24x7

	        service_notification_options    w,u,c,r

	        host_notification_options       d,u,r

	        service_notification_commands   notify-by-email

	        host_notification_commands      host-notify-by-email

	        email                           drussell at mpifix.com

	        }

	 

	 

	I have 2 services in my services.cfg. (template config and a
ping check):

	# Generic service definition template

	define service{

	        name                            generic-service ; The
'name' of this service template, referenced in other service definitions

	        active_checks_enabled           1       ; Active service
checks are enabled

	        passive_checks_enabled          1       ; Passive
service checks are enabled/accepted

	        parallelize_check               1       ; Active service
checks should be parallelized (disabling this can lead to major
performance problems)

	        obsess_over_service             1       ; We should
obsess over this service (if necessary)

	        check_freshness                 0       ; Default is to
NOT check service 'freshness'

	        notifications_enabled           1       ; Service
notifications are enabled

	        event_handler_enabled           1       ; Service event
handler is enabled

	        flap_detection_enabled          1       ; Flap detection
is enabled

	        process_perf_data               1       ; Process
performance data

	        retain_status_information       1       ; Retain status
information across program restarts

	        retain_nonstatus_information    1       ; Retain
non-status information across program restarts

	 

	        register                        0       ; DONT REGISTER
THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!

	        }

	 

	 

	# Netscren Ping Service definition

	define service{

	        use                             generic-service
; Name of service template to use

	 

	        host_name                       *

	        service_description             Netscreen Ping

	        is_volatile                     0

	        check_period                    24x7

	        max_check_attempts              3

	        normal_check_interval           3

	        retry_check_interval            1

	        contact_groups                  nsadmins

	        notification_interval           120

	        notification_period             24x7

	        notification_options            w,u,c,r

	        check_command                   check_ping

	        }

	 

	 

	Where have I gone wrong? Why wouldn't the pages show up?

	 

	
	--Thanks!

	 

	Danny Russell

	Mobile Productivity, Inc.

	drussell at mpifix.com

	Enabling the World To Work

	 

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050506/4b0964f1/attachment.html>


More information about the Users mailing list