MK's Remote Plugin Executor
Letzte Aktualisierung: 17. September 2009
Calling Nagios Plugins
Calling standard Nagios plugins next to check_mk on the Nagios host is straight forward: Just do it as you did before check_mk. Check_mk and standard plugins perfectly work side by side.
Calling Nagios plugins on a target host is another thing. Check_mk tries hard to make those plugins unneccessary. In some cases, however, they are still useful. For example:
Using MRPE to call Nagios Plugins
As of check_mk version 1.0.36 the Linux and UNIX agents have integrated MRPE. With MRPE It is very easy to let Nagios plugins be called from the agent. All you need is a small configuration file mrpe.cfg and - well - the plugins you want ot call. The file mrpe.cfg must be located in the agent's configuration directory (at the same place where logwatch.cfg lies). If you did not change that at setup, the complete path is /etc/check_mk/mrpe.cfg.
Each line in mrpe.cfg configures one plugin to be executed. It consists of
Comments and empty lines are allowed. The following example configures five plugins to be executed:
LOAD /usr/lib/nagios/plugins/check_load -w 2 -c 5 FS_var /usr/lib/nagios/plugins/check_disk /var FS_hirn /usr/lib/nagios/plugins/check_disk /hirn Aptitude /usr/lib/nagios/plugins/check_apt Smart_sda /usr/lib/nagios/plugins/check_ide_smart -d /dev/sda -n
root@linux# cmk -I --checks=mrpe somehost123 mrpe 5 new checks
If you are curious about how the MRPE section in the output of the agent looks like - here is an example:
root@linux# check_mk -d somehost123 | grep -A5 mrpe <<<mrpe>>> LOAD 0 OK - load average: 0.31, 0.27, 0.20|load1=0.310;2.000;5.000;0; load5=... FS_var 0 DISK OK - free space: / 133783 MB (75% inode=97%);| /=42731MB;;;0;185961 FS_hirn 2 DISK CRITICAL - /hirn is not accessible: No such file or directory Aptitude 0 APT OK: 0 packages available for upgrade (0 critical updates). Smart_sda 0 OK - Operational (19/19 tests passed)
You need not worry about performance data. All performance output by the plugins is transparently transported to Nagios, as long as it is compatible with the standardized Nagios format for performance data.
1.1.4: If you are using PNP4Nagios, you can let Check_MK help it to choose a matching template. This is done by appending the name of the original check to the performance data. You need an up-to-date agent for that (currently supported only on Linux). All you have to do is to add to your main.mk:
perfdata_format = "pnp"
Using MRPE on localhost
Since using MRPE is very easy, you might want to use it for standard Plugins to be called on the Nagios server itself. This can easily be done by creating a mrpe.cfg on your Nagios machine and inventorizing localhost. Before you do this, however, please make sure that you've understood some limitations: