Skip to main content

Dear Centreon Community,

While trying to implement a basic “host autodiscver” using nmap, the following error appears after the discovery ends : command not allowed (whitelist) at array index '0'

Could somebody please help to correct this basic issue ?

Regards,

Jean

Hi ​@JeanBruder, Centreon has implemented a protection system to prevent security breaches from being executed by Centreon => Whitelist

to execute nmap plugin, you need to add an entry in myfile.yaml in /etc/centreon-gorgone/config.d/whitelist.conf.d/ and describe command line than gorgone process can execute.

Please have a look to Centreon’s definition (/etc/centreon-gorgone/config.d/whitelist.conf.d/centreon.yaml)

Then restart gorgoned process


Dear ​@Laurent 

Although I did think, as you describe, that the problem might be related to the execution whitelists, it was ultimately an error in the /etc/centreon-gorgone/config.d/whitelist.conf.d/centreon.yaml file that was corrected as follows:

Before :

- ^/usr/lib/centreon/plugins/.*$

Correct :
- ^(sudo\s+)?/usr/lib/centreon/plugins/.*$

Before :

 - ^/usr/share/centreon/www/modules/centreon-autodiscovery-server/script/run_save_discovered_host

Correct :

- ^/usr/share/centreon/(www/modules/centreon-autodiscovery-server/script|bin)/run_save_discovered_host
 

Hope it could help in another same case,

Regards,

Jean


Reply