Hi,
I’d like to add a perl script from Nagios Exchange to Check_Mk
I know that I need to look at the “Classical Active and Passive monitoring checks” to implement this, but is there documentation or guidelines related the following:
what variables can I call ? i.e. $HOSTADDRESS . since I want to use the script for a few different devices
where would I put the script? I tested it fine from CLI, but not sure if I should put it into a specific directory, or onto each distributed monitoring host?
Basically the perl script can be placed anywhere on the monitoring host. Packaged nagios plugins are placed in /usr/lib(64)/nagios/plugins/, so a good place for a non-packaged one would be /usr/local/lib(64)/nagios/plugins/.
In the rule you will have to use the full path to the script.
Another alternative is (if your script is passive/only checks things™ on the host it is placed on) to use MRPE so that the output of the perl script will be appended as <<<mrpe>>> section to your agent output.
PS: Don’t forget the $ at the end of the variable/macro: $HOSTADDRESS$