When issuing check_commands in OP5 Monitor they are run as the user monitor. However, they are not run in a full login session. As such, they have limited environment variables available to them. Sometimes it's necessary to make environment variables available to the check_commands. This can be done in the following ways.
It's possible to use the file /etc/sysconfig/naemon to define environment variables as such:
The above-mentioned method is not currently working on EL7. Instead, variables can be defined in /etc/systemd/system/monitor.service. In the section [Service], add the following line:
After this, a restart of the monitor service would be in place.
systemctl daemon-reload && systemctl restart monitor.service
Note that the above is a workaround waiting for the resolution of bug MON-10843. It's possible that the service file for monitor.service could be overwritten by a yum update. Please consult with Support for information about this.