Check_MK Xen Plugin Online

Last week I had posted that I would put the Xen VM plugin online in a few weeks. It makes no sense to just hack away at it without any testers, so I uploaded it to bitbucket.org

@Sayid here you go:

I put the Xen plugin online at bitbucket. This is the very simplest version and by default will only issue “unknown” if a VM isn’t showing any longer. You will get a critical for crashes though.

nagios/check_mk/xen

I also decided to not add XCP / XenServer support in my spare time. If someone wants support for the “xe”/XAPI-based products please contact my alter ego at work via the check_mk mailing list.

A newer screenshot, first from a normal Xen host and then few vm’s that are automatically aggregated into a cluster service, as they might run on any of two nodes.

Lets go through the config sections for creating cluster services in check_mk:

First we put tags on our xen hosts, in my case that would be “waxh”, i.e. like this:

all_hosts = all_hosts + [ '192.168.17.106|wa_tria|waxh|tcp|wartungsfenster', '192.168.17.107|wa_tria|waxh|tcp|wartungsfenster', '192.168.17.108|wa_tria|waxh|tcp|wartungsfenster', ]

Then we form a Cluster named xenA, consisting of two servers, and one xenB consisting of one. Assigning to cluster IIRC  is done at inventory time, that’s  why there is a single node “cluster” xenB. This way I can add a failover node for xenB later and any VM running on 192.168.17.108 will already know it’s clustered.

clusters = { “xenA” : [     “192.168.17.106”, “192.168.17.107”, ], “xenB” : [ “192.168.17.108”, ],}

Here we tell check_mk to handle all services starting with VM w on any node tagged waxh as clustered services.  You don’t need any more than that – check_mk will auto-find the right cluster based on the above “clusters” statement.

clustered_services = [( ["waxh"], ALL_HOSTS, [ "VM.w.*" ] )]

Last I’ll check that xend has come up on all Xen Hosts.

checks = [  ( ["waxh"], PHYSICAL_HOSTS, "ps", "xend", ( "~.*/usr/sbin/xend.*",2,2,2,2 ) ),]

PHYISCAL_HOSTS tells check_mk to not look up the cluster here, instead we’re looking for all members of a cluster now. Fancy, isn’t it? And of course, /usr/sbin/xend doesn’t work on my Debian Squeeze host. 🙂

Teilen Sie dies mit:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Reddit (Opens in new window)
Like Loading...

Related

Từ khóa » Check_mk Xen