Erreur sur le fichier resource.cfg
Bonjour,
Bonjour,
après installation et configuration de nagios j'ai vérifié les fichiers de configuration a l'aide de : sudo nagios3 -v /etc/nagios3/nagios.cfg
le message suivant s'affiche :
error: Unexpected token or statement in file '/etc/nagios3/conf.d/resource.cfg 'on line 24
voici le fichier resource.cfg en question:
###########################################################################
#
# RESOURCE.CFG - Resource File for Nagios
#
# You can define $USERx$ macros in this file, which can in turn be used
# in command definitions in your host config file(s). $USERx$ macros are
# useful for storing sensitive information such as usernames, passwords,
# etc. They are also handy for specifying the path to plugins and
# event handlers - if you decide to move the plugins or event handlers to
# a different directory in the future, you can just update one or two
# $USERx$ macros, instead of modifying a lot of command definitions.
#
# The CGIs will not attempt to read the contents of resource files, so
# you can set restrictive permissions (600 or 660) on them.
#
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
#
# Resource files may also be used to store configuration directives for
# external data sources like MySQL...
#
###########################################################################
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/lib/nagios/plugins
# Sets $USER2$ to be the path to event handlers
#$USER2$=/usr/lib/nagios/plugins/eventhandlers
# Store some usernames and passwords (hidden from the CGIs)
#$USER3$=someuser
#$USER4$=somepassword
Bonjour,
après installation et configuration de nagios j'ai vérifié les fichiers de configuration a l'aide de : sudo nagios3 -v /etc/nagios3/nagios.cfg
le message suivant s'affiche :
error: Unexpected token or statement in file '/etc/nagios3/conf.d/resource.cfg 'on line 24
voici le fichier resource.cfg en question:
###########################################################################
#
# RESOURCE.CFG - Resource File for Nagios
#
# You can define $USERx$ macros in this file, which can in turn be used
# in command definitions in your host config file(s). $USERx$ macros are
# useful for storing sensitive information such as usernames, passwords,
# etc. They are also handy for specifying the path to plugins and
# event handlers - if you decide to move the plugins or event handlers to
# a different directory in the future, you can just update one or two
# $USERx$ macros, instead of modifying a lot of command definitions.
#
# The CGIs will not attempt to read the contents of resource files, so
# you can set restrictive permissions (600 or 660) on them.
#
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
#
# Resource files may also be used to store configuration directives for
# external data sources like MySQL...
#
###########################################################################
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/lib/nagios/plugins
# Sets $USER2$ to be the path to event handlers
#$USER2$=/usr/lib/nagios/plugins/eventhandlers
# Store some usernames and passwords (hidden from the CGIs)
#$USER3$=someuser
#$USER4$=somepassword
A voir également:
- Erreur sur le fichier resource.cfg
- Fichier bin - Guide
- Fichier epub - Guide
- Fichier rar - Guide
- Comment réduire la taille d'un fichier - Guide
- Fichier .dat - Guide
1 réponse
Eh bien comme le dit le message d'erreur il y a une erreur de syntaxe ligne 24. Laquelle est-ce ? Te paraît-elle correcte ?
Vérifie que la ligne ne se termine pas par des caractères inutiles ou essaye de la réécrire si tu ne vois pas d'erreur (ce peut être un problème de caractère "invisible").
Bonne chance
Vérifie que la ligne ne se termine pas par des caractères inutiles ou essaye de la réécrire si tu ne vois pas d'erreur (ce peut être un problème de caractère "invisible").
Bonne chance