Use custom script as check command

Hi !

How can i use a custom script as check command in icinga Director. I Know i have to call it with pluginDir + script.py but what is the path where i should put it? var/lib/api?

Thanks

Hi & welcome,

You could put your script everywhere you want. We for example don’t use for our custom scripts the same directory as the base plugins are installed from the nagios-plugins/monitoring-plugins. We wanted to seperate this for example to be save if something will broke in future with an update or whatever …

Which path is behind the constant pluginDir on your system is defined in /etc/icinga2/constants.conf. On our system (CentOS7) is this e.g. /usr/lib64/nagios/plugins.

So if you define a new command in the director you can use the full qualified path or cobmine it with the constant and your script name, like the checks from the ITL

Hi Stevie,

Thank you very much, this was the answer i needed.!

1 Like