Bonjour,
J'ai installe recemment Nagios 2.4.0 sur une centOS 5.7.
Lors de l'export vers Nagios j'ai l'erreur suivante en mode debug (-v):
et sans le mode debug :
Preparing environment... OK
Generating files... OK
Moving files... NOK (Could not write to file 'checkcommands.cfg' for monitoring engine 'Central'. Please add writing permissions for the webserver's user)
Aborted.
[root@192 1]# pwd
/usr/local/centreon/filesGeneration/nagiosCFG/1
ls -l :
rwxrwxrwx 1 root root 1792 Mar 8 10:56 cgi.cfg
-rwxrwxrwx 1 root root 9259 Mar 8 10:56 checkcommands.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 connectors.cfg
-rwxrwxrwx 1 root root 1274 Mar 8 10:56 contactgroups.cfg
-rwxrwxrwx 1 root root 1503 Mar 8 10:56 contacts.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 contactTemplates.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 dependencies.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 escalations.cfg
-rwxrwxrwx 1 root root 1170 Mar 8 10:56 hostgroups.cfg
-rwxrwxrwx 1 root root 1392 Mar 8 10:56 hosts.cfg
-rwxrwxrwx 1 root root 2537 Mar 8 10:56 hostTemplates.cfg
-rwxrwxrwx 1 root root 1573 Mar 8 10:56 meta_commands.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_contact.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_contactgroup.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_dependencies.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_escalations.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_host.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_hostgroup.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_services.cfg
-rwxrwxrwx 1 root root 1341 Mar 8 10:56 meta_timeperiod.cfg
-rwxrwxrwx 1 root root 3301 Mar 8 10:56 misccommands.cfg
-rwxrwxrwx 1 root root 4132 Mar 8 10:56 nagios.cfg
-rwxrwxrwx 1 root root 3667 Mar 8 10:56 nagiosCFG.DEBUG
-rwxrwxrwx 1 root root 1446 Mar 8 10:56 ndo2db.cfg
-rwxrwxrwx 1 root root 1347 Mar 8 10:56 ndomod.cfg
-rwxrwxrwx 1 root root 1124 Mar 8 10:56 resource.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 servicegroups.cfg
-rwxrwxrwx 1 root root 1949 Mar 8 10:56 services.cfg
-rwxrwxrwx 1 root root 4634 Mar 8 10:56 serviceTemplates.cfg
-rwxrwxrwx 1 root root 1993 Mar 8 10:56 timeperiods.cfg
Et mon sudoers est le suivant :
## BEGIN: CENTREON SUDO
#Add by CENTREON installation script
User_Alias CENTREON=apache,centreon
Defaults:CENTREON !requiretty
# Monitoring engine Restart
CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart
CENTREON ALL = NOPASSWD: /etc/init.d/nagios restart
# Monitoring engine reload
CENTREON ALL = NOPASSWD: /etc/init.d/nagios* reload
CENTREON ALL = NOPASSWD: /etc/init.d/nagios reload
# Monitoring engine test config
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios* -v *
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios -v *
# Monitoring engine test for optim config
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios* -s *
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios -s *
# Snmptrapd Restart
CENTREON ALL = NOPASSWD: /etc/init.d/snmptrapd restart
# Snmptt restart
CENTREON ALL = NOPASSWD: /etc/init.d/snmptt restart
# CentStorage Restart
CENTREON ALL = NOPASSWD: /etc/init.d/centstorage restart
# CentStorage stop
CENTREON ALL = NOPASSWD: /etc/init.d/centstorage stop
# CentStorage start
CENTREON ALL = NOPASSWD: /etc/init.d/centstorage start
# Broker engine Restart
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db* restart
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db restart
# Broker engine reload
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db* reload
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db reload
## END: CENTREON SUDO
Quelqu'un aurait une idee,
PS: j'ai fait mon install et apparement un httpd etait deja installe pour elastix, du coup j'ai l'impression que centreon ne peut ecrire nulle part sans les droits 777 ??? A verifier
PS2: HTTPD ecrit ses fichiers dans /usr/local/nagios avec l'utilisateur asterix groupe asterix, comment modifier ce comportement sans modifier le comportement d'asterix ?
J'ai installe recemment Nagios 2.4.0 sur une centOS 5.7.
Lors de l'export vers Nagios j'ai l'erreur suivante en mode debug (-v):
Running debug mode... NOK Aborted. |
[ - ] Central sudo: no tty present and no askpass program specified |
Preparing environment... OK
Generating files... OK
Moving files... NOK (Could not write to file 'checkcommands.cfg' for monitoring engine 'Central'. Please add writing permissions for the webserver's user)
Aborted.
[root@192 1]# pwd
/usr/local/centreon/filesGeneration/nagiosCFG/1
ls -l :
rwxrwxrwx 1 root root 1792 Mar 8 10:56 cgi.cfg
-rwxrwxrwx 1 root root 9259 Mar 8 10:56 checkcommands.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 connectors.cfg
-rwxrwxrwx 1 root root 1274 Mar 8 10:56 contactgroups.cfg
-rwxrwxrwx 1 root root 1503 Mar 8 10:56 contacts.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 contactTemplates.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 dependencies.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 escalations.cfg
-rwxrwxrwx 1 root root 1170 Mar 8 10:56 hostgroups.cfg
-rwxrwxrwx 1 root root 1392 Mar 8 10:56 hosts.cfg
-rwxrwxrwx 1 root root 2537 Mar 8 10:56 hostTemplates.cfg
-rwxrwxrwx 1 root root 1573 Mar 8 10:56 meta_commands.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_contact.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_contactgroup.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_dependencies.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_escalations.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_host.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_hostgroup.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 meta_services.cfg
-rwxrwxrwx 1 root root 1341 Mar 8 10:56 meta_timeperiod.cfg
-rwxrwxrwx 1 root root 3301 Mar 8 10:56 misccommands.cfg
-rwxrwxrwx 1 root root 4132 Mar 8 10:56 nagios.cfg
-rwxrwxrwx 1 root root 3667 Mar 8 10:56 nagiosCFG.DEBUG
-rwxrwxrwx 1 root root 1446 Mar 8 10:56 ndo2db.cfg
-rwxrwxrwx 1 root root 1347 Mar 8 10:56 ndomod.cfg
-rwxrwxrwx 1 root root 1124 Mar 8 10:56 resource.cfg
-rwxrwxrwx 1 root root 1089 Mar 8 10:56 servicegroups.cfg
-rwxrwxrwx 1 root root 1949 Mar 8 10:56 services.cfg
-rwxrwxrwx 1 root root 4634 Mar 8 10:56 serviceTemplates.cfg
-rwxrwxrwx 1 root root 1993 Mar 8 10:56 timeperiods.cfg
Et mon sudoers est le suivant :
## BEGIN: CENTREON SUDO
#Add by CENTREON installation script
User_Alias CENTREON=apache,centreon
Defaults:CENTREON !requiretty
# Monitoring engine Restart
CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart
CENTREON ALL = NOPASSWD: /etc/init.d/nagios restart
# Monitoring engine reload
CENTREON ALL = NOPASSWD: /etc/init.d/nagios* reload
CENTREON ALL = NOPASSWD: /etc/init.d/nagios reload
# Monitoring engine test config
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios* -v *
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios -v *
# Monitoring engine test for optim config
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios* -s *
CENTREON ALL = NOPASSWD: /usr/local/nagios/bin/nagios -s *
# Snmptrapd Restart
CENTREON ALL = NOPASSWD: /etc/init.d/snmptrapd restart
# Snmptt restart
CENTREON ALL = NOPASSWD: /etc/init.d/snmptt restart
# CentStorage Restart
CENTREON ALL = NOPASSWD: /etc/init.d/centstorage restart
# CentStorage stop
CENTREON ALL = NOPASSWD: /etc/init.d/centstorage stop
# CentStorage start
CENTREON ALL = NOPASSWD: /etc/init.d/centstorage start
# Broker engine Restart
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db* restart
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db restart
# Broker engine reload
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db* reload
CENTREON ALL = NOPASSWD: /etc/init.d/ndo2db reload
## END: CENTREON SUDO
Quelqu'un aurait une idee,
PS: j'ai fait mon install et apparement un httpd etait deja installe pour elastix, du coup j'ai l'impression que centreon ne peut ecrire nulle part sans les droits 777 ??? A verifier
PS2: HTTPD ecrit ses fichiers dans /usr/local/nagios avec l'utilisateur asterix groupe asterix, comment modifier ce comportement sans modifier le comportement d'asterix ?
Comment