Hi,
We often get issue with custom plugin (or event handlers) implemented in Bash as the behavior between running them manually from the shell behaves differently of when they’re run by the centengine process. I guess this is a normal behavior and related to the login/interactive nature of the shell, which differs in both cases.
Does someone is able to bring some precision on the method centengine uses to run the commands?
I’m not sure to understand the meaning of the following option in command configuration (picture pasted at the end of the post because it seems I can’t move it between text blocks):
Does the description mean it has no influence when using Centreon Engine?
Does centengine force the shell to be interactive (and thus loads some environment of the centreon-engine user? Or does it set some variables independently? What else?
I have to run some tests but I’d like to ask here if someone has any clue. Some users in our company have observed difference in the $PATH value between a central and a poller and values are both different of the profile value of centreon-engine.
I also noticed that (in RHEL 8) the PHP 8.1 package has a dependency on the package environment-module which offers a tool (not the simple kind of…) to get dynamic execution environment. It seems to be activated for php8.1 only, and maybe it’s another subject, but it may also have a link with the subject of this question(s). PHP being installed on the central only, if it changes the behavior of Centreon Engine between pollers and centrals this is an issue.
Something I’d like to do also, if possible, is to know if I can manually run commands in the same conditions than when it’s the centengine daemon which runs them.
Have a nice day.