[Check_mk (english)] Additional Nagios Macros + Wato

Hi,

  Due to the last thread about check_esx (check_vmware_api.pl) I got interested and set one up for us.

  We have one DC, two clusters, each with two hosts, each with a bundle of VMS.

  I could rather easily check that for example, whether VMWare tools are up-to-date - on a Datacenter level. However, it would be much better if this could occur on a host level. That way if the tools are out of date, the alert would be generated for the affected host, not for the entire DC.

  For this, I can set up this kind of active check:

$USER1$/check_vmware_api.pl -D vcenter.address.vintor.fi -N $HOSTNAME$ -f /usr/local/etc/check_mk/vntr-vcenter.auth -l runtime -s tools

  However, the problem is that the hostnames are different in VCenter and check_mk/Nagios. I'd like to use a different macro.

  Problem: Only other macro that can be edited in WATO or even check_Mk command line is $HOSTALIAS$. There are several possibilities: $HOSTDISPLAYNAME$ and $HOSTNOTES$. The notes field seems like a good candidate. However, I cannot edit this in check_mk, or better yet, in WATO.

  Any ideas on how to proceed? Of course, I could create some sort of separate function to "map" names from check_mk to vcenter, and call that instead (which in turn would call check_vmware_api.pl), but I'd prefer to keep things as simple as possible - meaning all configuration in one place.

- Antti

Hi,

i had the same problem vcenter hostname and hostname inside nagios. Since our first usage of check_esx/check_vmware_api we use

the $HOSTALIAS$ macro for addressing the vcenter name. Our old webfrontend for nagios configuration had the same limitations with

populate macros.

One point on the positiv site is that you see inside the multisite also the name from vcenter.

br

Andreas

···

2012/8/2 Mäkelä, Antti Antti.Makela@vintor.fi

Hi,

Due to the last thread about check_esx (check_vmware_api.pl) I got interested and set one up for us.

We have one DC, two clusters, each with two hosts, each with a bundle of VMS.

I could rather easily check that for example, whether VMWare tools are up-to-date - on a Datacenter level. However, it would be much better if this could occur on a host level. That way if the tools are out of date, the alert would be generated for the affected host, not for the entire DC.

For this, I can set up this kind of active check:

$USER1$/check_vmware_api.pl -D vcenter.address.vintor.fi -N $HOSTNAME$ -f /usr/local/etc/check_mk/vntr-vcenter.auth -l runtime -s tools

However, the problem is that the hostnames are different in VCenter and check_mk/Nagios. I’d like to use a different macro.

Problem: Only other macro that can be edited in WATO or even check_Mk command line is $HOSTALIAS$. There are several possibilities: $HOSTDISPLAYNAME$ and $HOSTNOTES$. The notes field seems like a good candidate. However, I cannot edit this in check_mk, or better yet, in WATO.

Any ideas on how to proceed? Of course, I could create some sort of separate function to “map” names from check_mk to vcenter, and call that instead (which in turn would call check_vmware_api.pl), but I’d prefer to keep things as simple as possible - meaning all configuration in one place.

  • Antti

checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en