Child pages
  • How to monitor a Citrix XenServer Cluster
Skip to end of metadata
Go to start of metadata

The purpose of this article is to describe how-to set up agentless monitoring of a Citrix XenServer using op5 Monitor. The plugin uses the XEN API to communicate with the XenServer so no changes to the server has to be made.

Through the plugin we can check the following parameters on the host and virtual servers running in the XEN environment.

Session specific parameters:

  • list hosts
  • pool(s) state
  • VMs state

Host specific parameters:

  • cpu (total, per core)
  • memory
  • disk I/O
  • network I/O
  • VM(s) running on this host
  • time difference

VM specific parameters:

  • cpu (total, core)
  • memory(allocated, ballooned, internal)
  • disk I/O
  • network I/O

Prerequisites

  • Make sure you have the latest op5 plugin package installed. To verify this simply do a “yum update” when logged in to op5 Monitor via SSH.
  • Create a common user on your hosts. It will be used by the plugin to communicate with the XEN API on your hosts.
  • Add the master host in your cluster environment to op5 Monitor. All checks in this how-to will ask the master host.
    Note: If you need to monitor VMs that is not running on the master host, also add the host that the VM is running on to the op5 Monitor and add the VM checks to that host.
  • Host address in op5 Monitor must be the IP of the server.

 

Check commands

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

Commands for the cluster

 

command_namecommand_line
check_xenapi_list_host$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l listhost
check_xenapi_list_pool$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l listpool
check_xenapi_list_vms$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -l list

 

Commands for the hosts

 

command_namecommand_line
check_xenapi_host_cpu$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -H $ARG3$ -l cpu -w $ARG4$ -c $ARG5$
check_xenapi_host_cpu_core$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -H $ARG3$ -l cpu -s $ARG4$ -w $ARG5$ -c $ARG6$
check_xenapi_host_io$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -H $ARG3$ -l io
check_xenapi_host_mem$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -H $ARG3$ -l mem -w $ARG4$ -c $ARG5$
check_xenapi_host_net$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -H $ARG3$ -l net
check_xenapi_host_time$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -H $ARG3$ -l time -s $ARG4$

 

Commands for the VMs

 

command_namecommand_line
check_xenapi_vm_cpu$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -N $ARG3$ -l cpu -w $ARG4$ -c $ARG5$
check_xenapi_vm_io$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -N $ARG3$ -l io
check_xenapi_vm_mem$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -N $ARG3$ -l mem -w $ARG4$ -c $ARG5$
check_xenapi_vm_mem_ballooned$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -N $ARG3$ -l mem -s ballooned -w $ARG4$ -c $ARG5$
check_xenapi_vm_net$USER1$/check_xenapi.pl -S $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -N $ARG3$ -l net

Note:

  • It is possible to use the VMs UUID instead of the name (short hostname). Add “-U” after “-N $ARG1$” and use the UUID as ARG1, ie. ” -N 9789ff86-c909-36a1-0d3d-149fd18c0898 -U”
  • For more commands options and details, look at the plugin help.

Adding the services

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 cluster, global

service_descriptioncheck_commandcheck_command_args
host list check_xenapi_list_hostusername!password
host pool check_xenapi_list poolusername!password
VMs list check_xenapi_list_vmsusername!password

Services for the hosts

service_descriptioncheck_commandcheck_command_args
host1 cpucheck_xenapi_host_cpuusername!password!host1!80!90
host1 core 0check_xenapi_host_cpu_coreusername!password!host1!0!80!90
host1 disk iocheck_xenapi_host_iousername!passwordr!host1
host1 mem totalcheck_xenapi_host_memusername!password!host1!85!95
host1 netcheck_xenapi_host_netusername!password!host1
host1 time difcheck_xenapi_host_timeusername!password!host1!time

Services for VMs

service_descriptioncheck_commandcheck_command_args
vm1 cpucheck_xenapi_vm_cpuusername!password!vm1!80!90
vm1 disk iocheck_xenapi_vm_iousername!password!vm1
vm1 mem totalcheck_xenapi_vm_memusername!password!vm1!85!95
vm1 mem balloonedcheck_xenapi_vm_mem_balloonedusername!password!vm1!ballooned!80!90
vm1 netcheck_xenapi_vm_netusername!password!vm1

Save your configuration.

Here is an example of how these checks will look like in production.

 

Remarks

This plugin is still under development. More checks will be added. Please send your feedback on op5 users mailing list.

All checks have been tested on Citrix XenServer cluster v5.5 and 6.0.

You can see this plugin in use on our demo site.