Nagios XEN plugin

I have tried the new XEN api-plugin for nagios the other day. It works well and i hope the team behind OP5 will make it available in the standard package soon.

The plugin is available here, Download the code from GIT. Move the xen folder to /opt/plugins/xen as this is a dependency, that folder contains the API code for XEN. Move the file to your normal plugin location.

After moving the folder and file to the right location, you can try to see if you’ll get any results from your server.

[root@monitor]# ./ -S -u user -p mypass -l listhost
CHECK_XENAPI.PL OK - 1/1 are enabled: xen1(ENABLED) | hostcount=1units;;

Make sure you use the http:// in the url to the server, otherwise it will fail. Took me a while to figure that one out

If you would like to check the how cpu,

[root@monitor]# ./ -S -u user -p mypass -l cpu -H xen1
CHECK_XENAPI.PL OK - cpu: usage = 0.64 %, loadavg = 0.0300 | cpu_usage=0.64%;; loadavg=0.0300;;

If you would like to check the net status, it displays status for all network cards

[root@monitor]# ./ -S -u user -p mypass -l net -H xen1
CHECK_XENAPI.PL OK - net: send = 0.16 KBps, receive = 0.65 KBps, send errors = 0, receive errors = 0 | send=0.16KBps;; receive=0.65KBps;; send_errors=0;; receive_errors=0;;

If you would like to check the IO,

[root@monitor]# ./ -S -u user -p mypass -l io -H xen1
CHECK_XENAPI.PL OK - disk io: cache size = 0 B, cache misses = 0, cache hits = 0 | cache_size=0B;; cache_misses=0;; cache_hits=0;;

If you would like to show running vm’s on the server,

[root@monitor]# ./ -S -u user -p mypass -l list -H xen1
CHECK_XENAPI.PL OK - 3/3 are Running: server1(Running), server2(Running), server3(Running) | vmcount=3units;;

You can also run checks against a specific vm aswell,

[root@monitor]# ./ -S -u user -p mypass -l cpu -N server1
CHECK_XENAPI.PL OK - VM 'server1' cpu: usage = 0.20 % | cpu_usage=0.20%;;
« »