# centreontrapd CENTREON ALL = NOPASSWD: /sbin/service centreontrapd start CENTREON ALL = NOPASSWD: /sbin/service centreontrapd stop CENTREON ALL = NOPASSWD: /sbin/service centreontrapd restart CENTREON ALL = NOPASSWD: /sbin/service centreontrapd reload CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd start CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd stop CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd restart CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd reload
# Centreon Engine CENTREON ALL = NOPASSWD: /sbin/service centengine start CENTREON ALL = NOPASSWD: /sbin/service centengine stop CENTREON ALL = NOPASSWD: /sbin/service centengine restart CENTREON ALL = NOPASSWD: /sbin/service centengine reload CENTREON ALL = NOPASSWD: /usr/sbin/service centengine start CENTREON ALL = NOPASSWD: /usr/sbin/service centengine stop CENTREON ALL = NOPASSWD: /usr/sbin/service centengine restart CENTREON ALL = NOPASSWD: /usr/sbin/service centengine reload CENTREON ALL = NOPASSWD: /bin/systemctl start centengine CENTREON ALL = NOPASSWD: /bin/systemctl stop centengine CENTREON ALL = NOPASSWD: /bin/systemctl restart centengine CENTREON ALL = NOPASSWD: /bin/systemctl reload centengine CENTREON ALL = NOPASSWD: /usr/bin/systemctl start centengine CENTREON ALL = NOPASSWD: /usr/bin/systemctl stop centengine CENTREON ALL = NOPASSWD: /usr/bin/systemctl restart centengine CENTREON ALL = NOPASSWD: /usr/bin/systemctl reload centengine
# Centreon Broker CENTREON ALL = NOPASSWD: /sbin/service cbd start CENTREON ALL = NOPASSWD: /sbin/service cbd stop CENTREON ALL = NOPASSWD: /sbin/service cbd restart CENTREON ALL = NOPASSWD: /sbin/service cbd reload CENTREON ALL = NOPASSWD: /usr/sbin/service cbd start CENTREON ALL = NOPASSWD: /usr/sbin/service cbd stop CENTREON ALL = NOPASSWD: /usr/sbin/service cbd restart CENTREON ALL = NOPASSWD: /usr/sbin/service cbd reload CENTREON ALL = NOPASSWD: /bin/systemctl start cbd CENTREON ALL = NOPASSWD: /bin/systemctl stop cbd CENTREON ALL = NOPASSWD: /bin/systemctl restart cbd CENTREON ALL = NOPASSWD: /bin/systemctl reload cbd CENTREON ALL = NOPASSWD: /usr/bin/systemctl start cbd CENTREON ALL = NOPASSWD: /usr/bin/systemctl stop cbd CENTREON ALL = NOPASSWD: /usr/bin/systemctl restart cbd CENTREON ALL = NOPASSWD: /usr/bin/systemctl reload cbd
## END: CENTREON SUDO
Hello,
What are the Gorgone logs on the central server when you export the configuration ?
Also you can try to manually restart the centengine Poller and then try to see if reloading/restarting work with the Web UI.
Hello,
What are the Gorgone logs on the central server when you export the configuration ?
Also you can try to manually restart the centengine Poller and then try to see if reloading/restarting work with the Web UI.
the Gorgone logs on the central serve:
2021-12-02 13:23:52 - ERROR - autodiscovery] -class- host discovery - cannot get platform versions - Login error code: '500'] message: 'Internal Server Error'] 2021-12-02 13:24:02 - INFO - legacycmd] Handling command 'SENDCFGFILE', Target: '3' 2021-12-02 13:24:02 - INFO - legacycmd] Handling command 'SENDCBCFG', Target: '3' 2021-12-02 13:24:02 - INFO - legacycmd] Handling command 'RESTART', Target: '1' 2021-12-02 13:24:02 - INFO - legacycmd] Handling command 'RESTART', Target: '3' 2021-12-02 13:24:07 - INFO - proxy] Received setlogs for '3' 2021-12-02 13:24:27 - INFO - proxy] Pong received from '3'
manually restart the centengine Poller in the Web UI can find it works , Uptime changed to new
Yes the uptime changed because you manually restarted centengine. But now, does it work when you export the configuration and restart via the Web UI ?
Hello!
I had the same issue in 21.04, I found that restarting centreon service on the pollers resolve everything.
Maybe you start one too soon.
Hope It will help.
Yes the uptime changed because you manually restarted centengine. But now, does it work when you export the configuration and restart via the Web UI ?
manually restarted centengine it works but restart via web UI still can't restart or reload
Hello!
I had the same issue in 21.04, I found that restarting centreon service on the pollers resolve everything.
Maybe you start one too soon.
Hope It will help.
Thank you but I try it like this restart centreon then in web UI find uptime change to new . but when I try to restart via web UI I found cfg files has changed but centreon engin not restart or reload.
Did you allow centreon group to access to your poller in access.conf ?
Hi, can you check in /var/log/messages on your poller if you don”t have security errors?
Can you also check centreon, centreon-gorgone and centreon-engine groups:
sorry for all , I found file /etc/sudoers.d/centreon
so iI thought I had installed sudo .
It was a mistake
so yum install -y sodu can solve this problem
Thank you @hqm199 for your feedback
Hi all,
I’m having a similar issue where reloads/restarts, but also other commands from the Centreon interface such as acknowledge, schedule downtime, don’t work. We’ve migrated our Centreon install from Alma to Debian. After which the issue occurred.
Below are the commands as configured in the poller:
I’m able to execute these commands as both centreon, centreon-gorgone and www-data:
su - centreon -s /bin/bash -c 'sudo systemctl restart centengine' su - centreon-gorgone -s /bin/bash -c 'sudo systemctl restart centengine' su - www-data -s /bin/bash -c 'sudo systemctl restart centengine'
I know it works as I can see the poller uptime reset in the webinterface. However when restarting the engine through the webinterface nothing happens (configuration files are exported/updated, but services aren’t restarted or reloaded).
I don’t think this is a sudoers permission issue as I’m able to execute the commands fine from the required users. What could be going wrong here?
Upon further investigation I found the following:
root@monitor2:~# tail -f /var/log/auth.log Aug 30 14:57:46 monitor2 sudo: pam_unix(sudo:auth): conversation failed Aug 30 14:57:46 monitor2 sudo: pam_unix(sudo:auth): auth could not identify password for [www-data] Aug 30 14:57:46 monitor2 sudo: www-data : command not allowed ; PWD=/usr/share/centreon/www ; USER=root ; COMMAND=/usr/bin/sudo /bin/systemctl reload cbd root@monitor2:~# su - www-data -s /bin/bash -c '/usr/bin/sudo /bin/systemctl restart centengine' root@monitor2:~#
But if I execute the command manually as www-data it works fine.