alexvea / centreon_check_command_on_svc_conf_page

Real time check command test via gorgone
MIT License
1 stars 2 forks source link

command not allowed (whitelist) at array index '0' #7

Closed alexvea closed 3 months ago

alexvea commented 4 months ago

image

alexvea commented 4 months ago

/var/log/centreon-gorgone/gorgoned.log

2024-04-11 17:51:08 - INFO - [action] command not allowed (whitelist): sudo -u centreon-engine echo 'poller :' $(hostname)' - user linux :' centreon-engine;echo command result: ;sudo -u centreon-engine /usr/lib/centreon/plugins//centreon_linux_ssh.pl --plugin=os::linux::local::plugin --mode=cmd-return --hostname='127.0.0.1' --ssh-backend='libssh' --ssh-username='centreon' --ssh-password='' --ssh-port=''  --exec-command=''if [ "$(find /glims/glims10/log/trl/houl_cyberlab_unix/ -mmin -15 | wc -c)" -eq 0 ]''  --exec-command-options='' --manage-returns='' `
alexvea commented 4 months ago

Workaround :

/etc/centreon-gorgone/config.d/40-gorgoned.yaml

[...]
      whitelist_cmds: true
      allowed_cmds:
[...]
       - ^(sudo\s+)?-u centreon-engine echo 'poller :'.* /usr/lib/centreon/plugins/.*$
[...]
alexvea commented 3 months ago

https://github.com/alexvea/centreon_check_command_on_svc_conf_page/commit/a95cf592f12c89d1d258fd1978eef93645d308ee