Bonjour,
Je suis en version 3.0.6 sur une debian Lenny.
je test nagios et j’obtiens des erreurs avec la plupart des plugin…
j’ai testé check_http, check_ssh, check_icmp,
pour l’instant seul icmp fonctionne en ajout le setuid root sur le plugin
/usr/lib/nagios/plugins/check_icmp
Voila l’erreur que j(obtient en redémarrant nagios :
(même erreur avec ssh, mais le fichier pointe vers /etc/nagios-plugins/config/ssh.cfg)
Restarting nagios3 monitoring daemon: nagios3
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL
Reading configuration data...
Warning: Duplicate definition found for command 'check_http' (config file '/etc/nagios-plugins/config/http.cfg', starting on line 2)
Error: Could not add object property in file '/etc/nagios-plugins/config/http.cfg' on line 3.
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
errors in config! failed!
failed!
Voici les premieres ligne du http.cfg :
# 'check_http' command definition
define command{
command_name check_http
command_line /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$'
}
Mon hosts.cfg :
define host{
name pc2
host_name pc2
alias pc2
address 192.168.100.13
check_period 24x7
check_interval 1
retry_interval 1
max_check_attempts 2
check_command check_icmp
notification_period 24x7
notification_interval 1
contacts jc
}
define host{
name pc1
host_name pc1
alias pc1
address 217.167.38.117
check_period 24x7
check_interval 1
retry_interval 1
max_check_attempts 2
check_command check_http
notification_period 24x7
notification_interval 1
contacts jc
}
Mon services.cfg :
define service{
host_name pc1
service_description Http
check_command check_http
notifications_enabled 1
active_checks_enabled 1
check_period 24x7
max_check_attempts 5
retry_check_interval 1
normal_check_interval 5
contacts jc
notification_options w,c,r
notification_interval 180
notification_period 24x7
}
define service{
host_name pc2
service_description ssh
check_command check_ssh
notifications_enabled 1
active_checks_enabled 1
check_period 24x7
max_check_attempts 5
retry_check_interval 1
normal_check_interval 5
contacts jc
notification_options w,c,r
notification_interval 180
notification_period 24x7
}
Mon commande.cfg :
define command{
command_name check_icmp
command_line $USER1$/check_icmp -H $HOSTADDRESS$
}
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$
}
mon nagios.cfg :
#NOUVEAU FICHIER CONFIG -services et hosts
cfg_file=/etc/nagios3/services.cfg
cfg_file=/etc/nagios3/hosts.cfg
Mon hostgroups_nagios2.cfg :
# A simple wildcard hostgroup
define hostgroup {
hostgroup_name SRV
alias test
members pc1,pc2
}
Voila, ce sont les seules fichiers que j’ai modifiés (contacts.cfg aussi). Je ne comprend pas ce message d’erreur.
En ai-je oublié d’autres fichiers ou d’autres paramètres ?
Merci.