I’m trying to create a new constant where I can keep my custom plugins separate from “PluginDir”. However, whenever I run the kickstart from Director, I get the following error:
execvpe(/opt/custom-icinga2-plugins/check_oob.py) failed: No such file or directory
In my /etc/icinga2/constants.conf file, I have the following entry:
const CustomPluginDir = "/opt/custom-icinga2-plugins"
In my services conf file, I have the following:
object CheckCommand "check_oob" {
command = [ CustomPluginDir + "/check_oob.py" ]
arguments = {
.
.
.
}
When I check the “External Commands” in Icinga2 Director, I see that the command line is converted to the absolute path:
object CheckCommand "check_oob" {
import "plugin-check-command"
command = [ "/opt/custom-icinga2-plugins/check_oob.py" ]
timeout = 1m
arguments += {
}