Note: check_xenapi is not supported on OP5 Monitor 9 and later. This guide was written for OP5 Monitor version 8.
This article describes 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, add also 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').
command_name | command_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 |
command_name | command_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$ |
command_name | command_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_description | check_command | check_command_args |
host list | check_xenapi_list_host | username!password |
host pool | check_xenapi_list pool | username!password |
VMs list | check_xenapi_list_vms | username!password |
Services for the hosts
service_description | check_command | check_command_args |
host1 cpu | check_xenapi_host_cpu | username!password!host1!80!90 |
host1 core 0 | check_xenapi_host_cpu_core | username!password!host1!0!80!90 |
host1 disk io | check_xenapi_host_io | username!passwordr!host1 |
host1 mem total | check_xenapi_host_mem | username!password!host1!85!95 |
host1 net | check_xenapi_host_net | username!password!host1 |
host1 time dif | check_xenapi_host_time | username!password!host1!time |
Services for VMs
service_description | check_command | check_command_args |
vm1 cpu | check_xenapi_vm_cpu | username!password!vm1!80!90 |
vm1 disk io | check_xenapi_vm_io | username!password!vm1 |
vm1 mem total | check_xenapi_vm_mem | username!password!vm1!85!95 |
vm1 mem ballooned | check_xenapi_vm_mem_ballooned | username!password!vm1!ballooned!80!90 |
vm1 net | check_xenapi_vm_net | username!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.
Comments
0 comments
Please sign in to leave a comment.