Hi all,
I have 3 CactiEZ running on different servers, in all of them i have the same issue when trying to start the embedded Nagios that comes in this CD.
This is the message when i point to <server_ip>/nagios
Whoops!
Error: Could not read host and service status information!So searching in google i find some possible solutions:
"go to console and try "/usr/bin/nagios -v /etc/nagios/nagios.cfg" and see the output
At first i got this error:
Error: Cannot open config file '/etc/nagios/misccommands.cfg' for reading: No such file or directory
Error processing object config files!
and in another site i found how to create that file and what put on it so i did it:
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios 2.6 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
# 'host-notify-by-epager' command definition
define command{
command_name host-notify-by-epager
command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
}
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios 2.6 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
# 'notify-by-epager' command definition
define command{
command_name notify-by-epager
command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
}
Then the error and warning disappear:
[
[email protected] /]# /usr/bin/nagios -v /etc/nagios/nagios.cfg
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Warning: comment_file variable ignored. Comments are now stored in the status and retention files.
Warning: downtime_file variable ignored. Downtime entries are now stored in the status and retention files.
Warning: aggregate_status_updates directive ignored. All status file updates are now aggregated.
Read main config file okay...
Processing object config file '/etc/nagios/checkcommands.cfg'...
Processing object config file '/etc/nagios/misccommands.cfg'...
Processing object config file '/etc/nagios/minimal.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 5 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 20 commands.
Checking time periods...
Checked 1 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
But now when i point again to the nagios server its says:
Whoops!
Error: Could not read host and service status information!
and i tried to run Nagios from console but it fails:
[
[email protected] /]# /etc/init.d/nagios start
nagios is stopped
Starting nagios: [FAILED]
Just dont know what to do now... its really strange because it happens in three different servers and they are all clean installs from CactiEZ CD. Bytheway, Cacti is working fine with lots of hosts graphs and weathermaps.
Any ideas what to try next?