Child pages
  • How to monitor a XEN installation
Skip to end of metadata
Go to start of metadata

Purpose

The purpose of this article is to describe how op5 Monitor can be used with the check_libvirt plugin for agentless monitoring of resource usage on a XEN installation (excluding Citrix XEN server environment). At the moment the plugin can monitor cpu, memory, disk I/O, network I/O on the guest VM and VM count, storage pool and pool volume on the target host.

Prerequisites

  • libvirt drivers need to be installed and running on both the op5 monitor server and on the target XEN host(s).
  • The plugin support several transport protocols but ssh is the preferred and will be used in this How-To. You need to setup a password-less communication for the user ‘monitor’ and the user that you will use for the communication between the op5 monitor server and the target XEN host(s).
  • Update op5 Monitor to get the latest plugin packet containing the check_libvirt plugin.

Check commands

Add the required check-commands in your configuration (‘Configure’ -> ‘Commands’ -> ‘Add new command‘ -> ‘Go’).

Commands for guest VM’s

command_namecommand_line
check_libvirt_xen_guest_cpu$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -N $ARG2$ -l CPU
check_libvirt_xen_guest_disk_io$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -N $ARG2$ -l IO
check_libvirt_xen_guest_mem$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -N $ARG2$ -l MEM
check_libvirt_xen_guest_net_io$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -N $ARG2$ -l NET

Commands for XEN host server

command_namecommand_line
check_libvirt_xen_host_running$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -l LIST
check_libvirt_xen_host_storage_pool$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -l POOL -s $ARG2$
check_libvirt_xen_host_volume$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -l VOLUME -s $ARG2$/$ARG3$
check_libvirt_xen_host_volume_all$USER1$/check_libvirt -H xen+ssh://$ARG1$@$HOSTADDRESS$ -l VOLUME

Note: $ARG1$ macro in the command_line to refer to the user you will use to connect to the XEN host server, the $HOSTADDRESS$ refer to the XEN host and the $ARG2$ refer to the guest VM-name.

Adding the services

Some services examples:

Add the required services that you need, (‘Configure’ -> ‘Host: ‘ -> ‘Go’ -> ‘Services for host ‘ -> ‘Add new service’ -> ‘Go’):

Please note that these arguments are just examples, you need to adjust them to suite your environment.

Services for guest VM

service_descriptioncheck_commandcheck_command_argsNote
VM dell-sth1 CPU Usagecheck_libvirt_xen_guest_cpuroot!dell-sth1*
VM dell-sth1 Mem Usagecheck_libvirt_xen_guest_memroot!dell-sth1*
VM dell-sth1 Disk IO Usagecheck_libvirt_xen_guest_disk_ioroot!dell-sth1*
VM dell-sth1 Net Usagecheck_libvirt_xen_guest_net_ioroot!dell-sth1*

Services for XEN host server

service_descriptioncheck_commandcheck_command_argsNote
xen-sth storage pool usagecheck_libvirt_xen_host_storage_poolroot!default*
xen-sth dell-sth1 volume usagecheck_libvirt_xen_host_volumeroot!dell-sth1!default*
xen-sth all volume usagecheck_libvirt_xen_host_volume_allroot*
xen-sth running vm listcheck_libvirt_xen_host_runningroot*

* Note: No warning or critical arguments are used in these examples. The plugin does however support thresholds.

How it looks like in monitor

Remarks

  • These check command has been tested on CentOS v5.5 and XEN v3.0 installation. It should work with other installations but some minor changes may be needed.
  • Critrix XEN server does not support libvirt. More information about Citrix XEN can be found here: How to monitor a Citrix XenServer Cluster

Read more

 http://www.libvirt.org/drvxen.html