salut à tous
je me présente: je suis un étudient spécialité réseaux informatique je suis entrain de réaliser mon projet de fin d'étude
le sujet de mon projet consiste a mettre en place un système de supervision réseau sous linux(ubuntu 9.04) :Nagios...(c juste la premier partie j'explique le reste du projet si nécessaire)
je vient d'installé nagios 3.0.2 pour superviser tt les équipements du réseau(machines
linux,windows,routeurs,imprimantes) .
j'ai un problème qui me rencontre actuellement au niveau des services de switch, il m'affiche dans l'nterface graphique du nagios l'etat du 4 services suivants :
PING
OK 02-05-2009 12:55:47 1d 3h 21m 7s 1/3 PING OK - Packet loss = 0%, RTA = 1.49 ms
Port 1 Bandwidth Usage
UNKNOWN 02-05-2009 12:46:50 1d 3h 20m 4s 3/3 check_mrtgtraf: Unable to open MRTG log file
Port 1 Link Status
CRITICAL 02-05-2009 12:47:52 1d 3h 19m 2s 3/3 (Return code of 127 is out of bounds - plugin may be missing)
Uptime
CRITICAL 02-05-2009 12:48:55 1d 3h 17m 59s 3/3 (Return code of 127 is out of bounds - plugin may be missing).
donc j'ai compri que le service ping ça marche bien mais le probleme dans les 3 autres services Port 1 Bandwidth Usage ,Port 1 Bandwidth Usage,Uptime.
pour mieu expliquer ce problème voila le contenue des 2 fichiers switch.cfg et commands.cfg:
switch.cfg:
# Define the switch that we'll be monitoring
define host{
use generic-switch ; Inherit default values from a template
host_name linksys-srw224p ; The name we're giving to this switch
alias Linksys SRW224P Switch ; A longer name associated with the switch
address x.x.x.x ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with
}
define hostgroup{
hostgroup_name switches ; The name of the hostgroup
alias Network Switches ; Long name of the group
}
# Create a service to PING to switch
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p ; The name of the host the service is associated with
service_description PING ; The service description
check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}
# Monitor uptime via SNMP
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
# Monitor Port 1 status via SNMP
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Port 1 Link Status
check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
}
# Monitor bandwidth via MRTG logs
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/x.x.x.x_1.log!AVG!1000000,1000000!5000000,5000000!10
}
je post une petite partie qui nous interesse pour le fichier commands.cfg :
# 'check_local_mrtgtraf' command definition
define command{
command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}
quelqu'un peut m'aider c urgent
merci d'avance.
Partager