Diese Blogposts sind eigentlich nur für mich, um ein paar Konfigurationen zu dokumentieren 😉
Benutzt wird das check_esx.pl von op5 http://www.op5.org/community/plugin-inventory/op5-projects/check-esx-plugin
Check Kommand Definitionen sind sowohl in der commands.cfg von Nagios als auch in der main.mk gültig:
extra_nagios_conf += r""" // place legacy check commands here """
define command{ command_name check-esx-datacenter command_line $USER2$/check_esx.pl -D 'vcenter' --extra-opts=check_esxi@/opt/omd/sites/nag/etc/nagios/plugins.ini -l $ARG1$ } define command{ command_name check-esx-vm command_line $USER2$/check_esx.pl -D 'vcenter' -N $ARG1$ -l $ARG2$ --extra-opts=check_esxi@/opt/omd/sites/nag/etc/nagios/plugins.ini } define command{ command_name check-esx-host command_line $USER2$/check_esx.pl -H $HOSTADDRESS$ -l $ARG1$ --extra-opts=check_esxi_host@/opt/omd/sites/nag/etc/nagios/plugins.ini } define command{ command_name check-esx-host-sub command_line $USER2$/check_esx.pl -H $HOSTADDRESS$ -l $ARG1$ -s $ARG2$ <a>--extra-opts=check_esxi_host@/opt/omd/sites/nag/etc/nagios/plugins.ini</a> }
legacy_checks Definition in der main.mk:
legacy_checks = [ (( "check-esx-datacenter!runtime", "ESXi VCenter Runtime", True ), [ "vcenter" ] ), (( "check-esx-host!cpu", "ESXi Host CPU", True ), [ "esx" ], ALL_HOSTS ), (( "check-esx-host!mem", "ESXi Host Speicher", True ), [ "esx" ], ALL_HOSTS ), (( "check-esx-host!net", "ESXi Host Netzwerk", True ), [ "esx" ], ALL_HOSTS ), (( "check-esx-host!io", "ESXi Host IO", True ), [ "esx" ], ALL_HOSTS ), (( "check-esx-host!runtime", "ESXi Host Runtime", True ), [ "esx", ALL_HOSTS ] ), (( "check-esx-host!vmfs", "ESXi Host vmfs", True ), [ "esx" ], ALL_HOSTS ), (( "check-esx-host!service", "ESXi Host Service", False ), [ "esx" ], ALL_HOSTS ), (( "check-esx-host-sub!vmfs!ISOStore", "ESXi Host ISO Store", True ), [ "esxi" ], ALL_HOSTS ), (( "check-esx-host-sub!vmfs!VMStore1", "ESXi Host VM Store 1", True ), [ "esxi" ], ALL_HOSTS ), (( "check-esx-host-sub!vmfs!VMStore2", "ESXi Host VM Store 2", True ), [ "esxi" ], ALL_HOSTS ), (( "check-esx-host-sub!vmfs!VMStore3", "ESXi Host VM Store 3", True ), [ "esxi" ], ALL_HOSTS ), ]
plugin.ini:
[check_esxi] username=DOMAIN\Nagios password=geheimespasswort [check_esxi_host] username=root password=nochvielgeheimer