xenserver

How to monitor a XEN installation

7 Marzo 2014 SnetAdmin Comments Off

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 NAME COMMAND 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 NAME COMMAND 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 DESCRIPTION CHECK COMMAND ARGUMENTS NOTE
VM dell-sth1 CPU Usage check_libvirt_xen_guest_cpu root!dell-sth1 *
VM dell-sth1 Mem Usage check_libvirt_xen_guest_mem root!dell-sth1 *
VM dell-sth1 Disk IO Usage check_libvirt_xen_guest_disk_io root!dell-sth1 *
VM dell-sth1 Net Usage check_libvirt_xen_guest_net_io root!dell-sth1 *

 

Services for XEN host server

SERVICE DESCRIPTION CHECK COMMAND ARGUMENTS NOTE
xen-sth storage pool usage check_libvirt_xen_host_storage_pool root!default *
xen-sth dell-sth1 volume usage check_libvirt_xen_host_volume root!dell-sth1!default *
xen-sth all volume usage check_libvirt_xen_host_volume_all root *
xen-sth running vm list check_libvirt_xen_host_running root *

 

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

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

Articoli recenti

Categorie