Skip to main content
Question

centreon-engine : load path variable for user

  • January 6, 2025
  • 3 replies
  • 57 views

Forum|alt.badge.img+1

hi,

 

I use centreon-plugins for azure.

When I run the plugin with centreon :

UNKNOWN: Command error: sh: az: command not found

 

I tried in command line with the user centreon-engine and it works. It works beacause the PATH is correctly setup but when centreon run the command it doesn’t load the profile…

 

How to run the profile of centreon-engine for this type of plugin ?

3 replies

Forum|alt.badge.img+1
  • Author
  • Steward *
  • January 7, 2025

I wonder if it is possible to add the az path to PATH variable in the /etc/profile or /etc/environment ?

 

I tried but no success until now.

 

The only way that it is working is to create a wrapper where I source .bashrc of centreon-engine user and then I run the command line centreon-plugins...


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • January 7, 2025

That is correct, centreon-engine is the one that runs the commands

https://docs.centreon.com/docs/installation/technical/#architecture


Forum|alt.badge.img+1
  • Author
  • Steward *
  • January 7, 2025

thanks but it is not my question 😀

centreon-engine run commands but when centreon run the plugin with the user linux user) centreon-engine, the profile of user is not loaded.

 

So, I would like to know how to “say” to centreon “please run the plugin by setting profile ?