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

@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.


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 + [ '|wa_tria|waxh|tcp|wartungsfenster',
'|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 will already know it’s clustered.

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

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. 🙂

2 thoughts on “Check_MK Xen Plugin online

  1. This might be awesomem if it was updated for xenserver7. The xm command is gone, and is replaced by xe.

    I have a xenserver that uses 100% CPU across all cores on the “performance” tab of xencenter, but all the VMs are nominal with CPU load. SNMP polling and check_mk_agent do not show the high CPU usage.

    • Hey,

      sorry to bring bad news.

      the plugin’s never been designed to work with XenServer, only the upstream version of Xen is supported.
      (I think I had added xl support long ago, it should be online somewhere too)

      XenServer adds quite a bit of complexity to this, and this is why I never just did it in my free time.
      First, you need to only check against the master.
      Then, all the UUID translations, and also the perf counters that you would need.
      I remember there *are* accessible perf counters the check would need to support, with a xe sub-sub-sub-command, but it’d take me already an hour to just put up the test systems, plus a few more time to write the more complex check, and then another half day for good graphs.

      If I’d use XenServer constantly, there would be some plugin (like for i.e. OpenNebula), but as it is I can’t do that.
      Hope you understand.

      I absolutely don’t know why so far (we’re talking like 6 years) no XenServer customer has hired the MK guys to just write the plugin.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s