j’ai resolu le prbl de permission, & j’arrive a démarrer Nagios. Mais, quand je lance l’interface web, je n’arrive pas a monitorer le reseau & je recois un messages d’error:
:x
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.
je check que nagios est up avec la commande :
[root@audit /]# ps -ef|grep nagios
root 1529 1 0 Oct13 ? 00:01:30 gedit file:///etc/rc.d/init.d/nagios
theboss 23051 1 0 02:26 ? 00:00:01 [nagios]
nagios 23074 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23075 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23076 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23077 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23078 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23081 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23082 1170 0 02:31 ? 00:00:00 [httpd]
nagios 23083 1170 0 02:31 ? 00:00:00 [httpd]
root 25717 12170 0 03:20 pts/0 00:00:00 grep nagios
Je n’arrive pas a comprendre pourquoi la commande ping ne marche pas… voila comment je l’ai defenie dans le fichier commands.cfg
‘check_ping’ command definition
define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
je refere a la commande dans le fichier services.cfg :
###############################################################################
Ping Test
###############################################################################
Service definition for Ping Tests
define service{
use generic-service ; Name of service template to use
host_name msebbane,bnassreddin,redouane,Linux,linux1
service_description PING
is_volatile 0
check_period 24x7
contact_groups apache
notification_options w,u,c,r
check_command check_ping
}
dans le fichier resources, j’ai specifier l’emplacement des plugins :
Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/nagios/libexec
j’ai aussi telecharger les plugins necessaire & installer sous /usr/local/nagios/libexec
[root@audit /]# ls /usr/local/nagios/libexec
check_breeze check_http check_nagios check_real check_ups check_by_ssh check_ifoperstatus check_nntp check_rpc check_users
check_dig check_ifstatus check_nt check_sensors check_wave check_disk check_imap check_ntp check_smtp
negate check_disk_smb check_ircd check_nwstat check_ssh urlize
check_dns check_load check_oracle check_swap utils.pm check_dummy check_log check_overcr check_tcp utils.sh check_file_age check_mailq check_ping check_time
check_flexlm check_mrtg check_pop check_udp
check_ftp check_mrtgtraf check_procs check_udp2
Quand le lance nagios avec l’option -v, il donne 0 erreurs & 0 warning:
***[root@audit /]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg ***
***Nagios 1.2
Copyright © 1999-2004 Ethan Galstad ([email protected])
Last Modified: 02-02-2004
License: GPL
Reading configuration data…
Running pre-flight check on configuration data…
Checking services…
Checked 5 services.
Checking hosts…
Checked 5 hosts.
Checking host groups…
Checked 2 host groups.
Checking contacts…
Checked 3 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking host group escalations…
Checked 0 host group 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 38 commands.
Checking time periods…
Checked 5 time periods.
Checking for circular paths between hosts…
Checking for circular service execution dependencies…
Checking global event handlers…
Checking obsessive compulsive service processor command…
Checking misc settings…
Total Warnings: 0
Total Errors: 0***
Mais quand je check le fichier de messages:
$ vi /var/log/messages
Oct 14 03:08:59 audit nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘bnassreddin’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
Oct 14 03:14:59 audit nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘linux1’ was out of bounds. Make sure the plugin you’re trying to
run actually exists.
Oct 14 03:20:59 audit nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘msebbane’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
Oct 14 03:26:59 audit nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘redouane’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
Oct 14 03:30:08 audit kernel: set_rtc_mmss: can’t update from 49 to 0
Oct 14 03:31:09 audit kernel: set_rtc_mmss: can’t update from 49 to 1
Oct 14 03:32:10 audit kernel: set_rtc_mmss: can’t update from 49 to 2
Oct 14 03:32:59 audit nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘Linux’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
j’ai lancé check_ping manuellement & ca marche…les autres check ossi marchent… :shock:
Je n’arrive vraiment a comprendre d’ou viens le probleme. Que dois-je faire Svp ?
Merci enormement pour votre aide,