Classical Active and Passive monitoring checks - some questions

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?

any advice would help, thanks

You should be able to use any of the macros that are also available in nagios. See this list: https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/macrolist.html

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$

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.