abeatbowl
07-03-2008, 04:29 PM
Bonjour à tous,
Je rencontre un petit souci avec ma configuration Nagios/Centreon.
D'abord, les détails de la config :
Serveur : CentOS 4.6
Nagios : 3.0.2
Centreon : 2.0-b4
Nrpe : 2.12
Mon souci concerne l'affichage d'un graphe sur l'espace disque d'un autre serveur (qu'on appellera B).
J'ai installé nrpe sur B, le démon tourne sans problème. Voici ma les commandes déclarées dans nrpe.cfg
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_root]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /
command[check_usr]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /usr
command[check_var]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /var
command[check_home]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /home
J'arrive très bien a récupérer les données de ces commandes, j'affiche même le graphe de charge CPU sans problème mais pas moyen avec check_disk, le graphe reste vide.
http://img71.imageshack.us/img71/1146/capvr9.jpg
ce qui concerne l'utilisation de check_disk, voici la configuration du service check_disk_root qui fait appel au template check_disk_nrpe qui suit
define service{
host_name B
service_description check_disk_root
use check_disk_nrpe
check_command check_nrpe!check_root
parallelize_check 1
obsess_over_service 1
check_freshness 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
}
define service{
name check_disk_nrpe
service_description check_disk_nrpe
use generic-service
check_command check_nrpe
normal_check_interval 5
retry_check_interval 1
check_period 24x7
process_perf_data 1
notification_interval 5
notification_options w,c
contact_groups Network_Administrators, Supervisors, System_Administrators
register 0
}
Voici la commande check_nrpe
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
Visiblement, tout ça fonctionne bien puisque le service est UP dans centreon et j'ai même les bons résultats :
Status Information DISK OK - free space: / 7217 MB (89% inode=96%):
Performance Data /=825MB;7201;7878;0;8472
Après plusieurs heures d'analyses, j'ai réussi à réduire mon champ d'investigation, en effet, vu que le résultats rendu par la commande check_nrpe semble bon, il se pourrait que le problème vienne de rrd, voici donc l'erreur qui apparait dans centstorage.log :
1215090225 - ERROR while creating /var/lib/centreon/metrics/16.rrd : Invalid DS name
1215090225 - ERROR while tunning operation on /var/lib/centreon/metrics/16.rrd : opening '/var/lib/centreon/metrics/16.rrd': Aucun fichier ou répertoire de ce type
1215090225 - ERROR while updating /var/lib/centreon/metrics/16.rrd at 1215090205 -> 825 : opening '/var/lib/centreon/metrics/16.rrd': Aucun fichier ou répertoire de ce type
J'ai vérifié, il n'existe en effet aucun fichier /var/lib/centreon/metrics/16.rrd , les droits sur le dossier doivent être OK puisque les autres graphes fonctionnent :
[root@server ]# ll /var/lib/centreon/metrics/
total 13056
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:03 10.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:03 11.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 12.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 13.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 17.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 18.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 19.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 1.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 2.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 3.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 4.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:01 5.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:01 6.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 7.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 8.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:03 9.rrd
Voila donc ou j'en suis, je bloque la depuis un petit moment sans vraiment savoir comment m'en sortir.
Merci d'avance pour votre aide. N'hésitez pas à demander plus de précisions si j'ai oublié de mentionner quelque chose.
Je rencontre un petit souci avec ma configuration Nagios/Centreon.
D'abord, les détails de la config :
Serveur : CentOS 4.6
Nagios : 3.0.2
Centreon : 2.0-b4
Nrpe : 2.12
Mon souci concerne l'affichage d'un graphe sur l'espace disque d'un autre serveur (qu'on appellera B).
J'ai installé nrpe sur B, le démon tourne sans problème. Voici ma les commandes déclarées dans nrpe.cfg
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_root]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /
command[check_usr]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /usr
command[check_var]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /var
command[check_home]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /home
J'arrive très bien a récupérer les données de ces commandes, j'affiche même le graphe de charge CPU sans problème mais pas moyen avec check_disk, le graphe reste vide.
http://img71.imageshack.us/img71/1146/capvr9.jpg
ce qui concerne l'utilisation de check_disk, voici la configuration du service check_disk_root qui fait appel au template check_disk_nrpe qui suit
define service{
host_name B
service_description check_disk_root
use check_disk_nrpe
check_command check_nrpe!check_root
parallelize_check 1
obsess_over_service 1
check_freshness 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
}
define service{
name check_disk_nrpe
service_description check_disk_nrpe
use generic-service
check_command check_nrpe
normal_check_interval 5
retry_check_interval 1
check_period 24x7
process_perf_data 1
notification_interval 5
notification_options w,c
contact_groups Network_Administrators, Supervisors, System_Administrators
register 0
}
Voici la commande check_nrpe
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
Visiblement, tout ça fonctionne bien puisque le service est UP dans centreon et j'ai même les bons résultats :
Status Information DISK OK - free space: / 7217 MB (89% inode=96%):
Performance Data /=825MB;7201;7878;0;8472
Après plusieurs heures d'analyses, j'ai réussi à réduire mon champ d'investigation, en effet, vu que le résultats rendu par la commande check_nrpe semble bon, il se pourrait que le problème vienne de rrd, voici donc l'erreur qui apparait dans centstorage.log :
1215090225 - ERROR while creating /var/lib/centreon/metrics/16.rrd : Invalid DS name
1215090225 - ERROR while tunning operation on /var/lib/centreon/metrics/16.rrd : opening '/var/lib/centreon/metrics/16.rrd': Aucun fichier ou répertoire de ce type
1215090225 - ERROR while updating /var/lib/centreon/metrics/16.rrd at 1215090205 -> 825 : opening '/var/lib/centreon/metrics/16.rrd': Aucun fichier ou répertoire de ce type
J'ai vérifié, il n'existe en effet aucun fichier /var/lib/centreon/metrics/16.rrd , les droits sur le dossier doivent être OK puisque les autres graphes fonctionnent :
[root@server ]# ll /var/lib/centreon/metrics/
total 13056
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:03 10.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:03 11.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 12.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 13.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 17.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 18.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 19.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 1.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:02 2.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 3.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 4.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:01 5.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:01 6.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 7.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:05 8.rrd
-rw-rw-r-- 1 nagios nagios 830176 jui 3 15:03 9.rrd
Voila donc ou j'en suis, je bloque la depuis un petit moment sans vraiment savoir comment m'en sortir.
Merci d'avance pour votre aide. N'hésitez pas à demander plus de précisions si j'ai oublié de mentionner quelque chose.