Skip to main content

Hello

I've tested the CMA plugin but I'm getting a message mentioning that the command can't be executed

 

 

This is a Centreon plugin, why are commands not allowed by default?

Commands | Centreon Documentation

 

if I need to whitelist commands, what should I enter in /etc/centreon-engine-whitelist/my-whitelist.yml?

 

regards,

Hi, 

Thanks for your feedback.

Can you indicate : 

  • which version you are using (central & Poller)
  • if you already definied a command whitelist (/etc/centreon-engine-whitelist/my-whitelist.yml)

 

Thanks


Hi,

 

Central 25.03.0 (cloud)

Poller 24.04.11

 

 

“my-whitelist.yml” contains the following commands

 

 


Thanks.

Did you created/edited this whitelist file on Poller, or are there default values ? 

Can you provide (here or in private message) the /var/log/centreon-engine/centengine.log  including these checks errors ? 

 


I don't remember editing the whitelist file

 

Please find the log:

 


Thanks, we identified the issue and are working on a fix.


Hi, could you try this workaround 

edit my-whitelist.yml : 

whitelist:
regex:
- \/usr\/lib(64)?\/nagios\/plugins\/.*
- \/usr\/lib(64)?\/nagios\/plugins\/.check_.*
- {"check":""^"]*"}
- \$_HOSTCENTREONAGENTPLUGINS\$/centreon_linux_local\.pl.*
- \$\_HOSTCENTREONAGENTPLUGINS\$/centreon_plugins\.exe.*
- `/usr/bin/echo Host alive`
- cmd\.exe\s+/C\s+echo\s+Centreon\s+Agent

Then restart engine

 

Let me know if this fix the issue


Hi,

It’s done:

 

i have the same issue:

 

 


Hello,

Can you try these regex instead:

\/usr\/lib(?:64){,1}\/nagios\/plugins

"C:\/Program Files\/Centreon\/Plugins\/centreon_plugins\.exe".+

^\{\s*"check":".*\}$

Regards


hello,

Same issue:

 

 


In logs, I see same regexps as before. Have you restarted centengine?

I have also forgotten two cases. So the final I hope:

\/usr\/lib(?:64){,1}\/nagios\/plugins\/.*

"C:\/Program Files\/Centreon\/Plugins\/centreon_plugins\.exe".+

^\{\s*"check":".*\}$

\/usr\/bin\/echo\s+Host\s+alive

cmd\.exe\s+\/C\s+echo\s+Centreon\s+Agent

 

 

 


the file my-whitelist.xml seems not to be taken into consideration


the file my-whitelist.xml seems not to be taken into consideration

could you send me the yml file by email, for more analysis on our side ?

fmattes@centreon.com 

thanks


Hello, I have made some mistakes in my previous post, the version I had tried:

whitelist:
regex:
- /usr/lib(?:64){0,1}/nagios/plugins/.*
- \"C:\/Program Files\/Centreon\/Plugins\/centreon_plugins.exe\"\s+.+
- ^\{\s*"check":".*\}$
- \/usr\/bin\/echo\s+Host\s+alive
- cmd\.exe\s+\/C\s+echo\s+Centreon\s+Agent

 


Hi ​@CAR-CENTREON , did you try this new whitelist ? 

Is it ok on your side ? 

thanks


Hi,

This seems to be solved, however the commands are not found.

 

sudo -u centreon-engine cmd.exe /C echo Centreon Agent

 

sudo -u centreon-engine "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode pending-reboot --warning-status="%{RebootPending} =~ /true/i" --critical-status="" --timeout="30" 

 


Thanks.

Can you check the following ? 

  1. Go to Configuration > Commands > Connectors.

  2. Update the Centreon Monitoring Agent connector in the following way: in the Used by command field, type Centreon-Monitoring-Agent and then click Select all.

 

Then export configuration & restart Engine + Agent


Hi,

Connectors are not avalaible. We are on Centreon Cloud.

 

 


Hi,

Connectors are not avalaible. We are on Centreon Cloud.

 

 

Hi, should be OK now.

Could you export your Poller configuration and give it another try ?


Hi,

I have the same issue:

sudo -u centreon-engine "C:/Program Files/Centreon/Plugins/centreon_plugins.exe" --plugin os::windows::local::plugin --mode sessions --language="en" --timeout="30" --warning-sessions-created="" --critical-sessions-created="" --warning-sessions-disconnected="" --critical-sessions-disconnected="" --warning-sessions-reconnected="" --critical-sessions-reconnected="" --warning-sessions-active="" --critical-sessions-active="" --warning-sessions-disconnected-current="" --critical-sessions-disconnected-current="" --use-new-perfdata


sudo: C:/Program Files/Centreon/Plugins/centreon_plugins.exe: command not found
 


I send you a private message to plan a meet and have a look on your configuration


Reply