Skip to content

XenServer

Open Source

This ZenPack is developed and supported by Zenoss Inc. Contact Zenoss to request more information regarding this or any other ZenPacks. Click here to view all available Zenoss Open Source ZenPacks.

Organization:

Zenoss, Inc.

License:

GNU General Public License, Version 2, or later

Name:

ZenPacks.zenoss.XenServer

More Information:

GitHub page/HomePage

Git Sources (For Cloning):

Link

Applications Monitored:

XenServer (6.0, 6.1, 6.2)

Citrix XenServer (6.0, 6.1, 6.2)

XenServer ZenPack

Monitoring for XenServer pools, hosts and related resources.

Support

This is an Open Source ZenPack developed by Zenoss, Inc. Enterprise support for this ZenPack is available to commercial customers with an active subscription.

Releases

Version 1.0.7- Download: Released on 2016/01/20: Requires PythonCollector ZenPack: Compatible with Zenoss Core 4.2.x, Zenoss Core 5.0.x, Zenoss Core 5.1.x, Zenoss Resource Manager 4.2.x, Zenoss Resource Manager 5.0.x, Zenoss Resource Manager 5.1.x, Zenoss Resource Manager 5.x.x

Background

This ZenPack provides support for monitoring XenServer. Monitoring is performed using XenAPI.

Features

The features added by this ZenPack can be summarized as follows. They are each detailed further below.

  • Initial discovery and continual synchronization of relevant components.
  • Performance monitoring.
  • Event management.
  • Service impact and root cause analysis. (Requires Zenoss Service Dynamics)

Discovery

The following components will be automatically discovered through the XenServer host, username and password you provide. The properties and relationships will be continually maintained by way consuming events from the host. By default model changes will be polled every 60 seconds. This can be configured with the zXenServerModelInterval configuration property.

Model Diagram

Pool: Properties: HA Allow Overcommit, HA Enabled, HA Host Failures to Tolerate, CPU ID Feature Mask, HVM Memory Ratio, PV Memory Ratio, Description, Label, vSwitch Controller: Relationships: Master Host, Default Storage Repository, Suspend Image Storage Repository, Crash Dump Storage Repository

Host: Properties: API Version Major, API Version Minor, API Version Vendor, Address, Allowed Operations, Capabilities, CPU Count, CPU Speed, Edition, Enabled, Hostname, Is Pool Master, Description, Label, Scheduling Policy, Total Memory: Relationships: Master for Pool, Suspend Image Storage Repository, Crash Dump Storage Repository, Local Cache Storage Repository, Server Device, Host CPUs, Physical Block Devices, Physical NICs, VMs

Host CPU (HostCPU): Properties: Family, Features, Flags, Model, Model Name, Number, Speed, Stepping, Vendor: Relationships: Host

Physical Block Device (PBD): Properties: Currently Attached, Device Name, Legacy Mode, Location: Relationships: Host, Storage Repository, Server Disk

Physical NIC (PIF): Properties: DNS Server Address, IPv4 Addresses, IPv6 Addresses, MAC Address, MTU, VLAN, Carrier, Currently Attached, Network Device, Network Device ID, Network Device Name, Disallow Unplug, IPv4 Gateway, IPv4 Configuration Mode, IPv6 Configuration Mode, IPv6 Gateway, Management, IPv4 Netmask, Physical, Primary Address Type, Speed, Vendor Name: Relationships: Host, Network, Server Interface

Storage Repository (SR): Properties: Allowed Operations, Content Type, Local Cache Enabled, Description, Label, Physical Size, Shared, SM Type, Type: Relationships: Virtual Disk Images, Physical Block Devices

Virtual Disk Image (VDI): Properties: Allow Caching, Allowed Operations, Is a Snapshot, Location, Managed, Missing, Description, Label, On Boot, Read Only, Sharable, Storage Lock, Type, Virtual Size: Relationships: Storage Repository, Virtual Block Devices

Network: Properties: MTU, Allowed Operations, Bridge, Default Locking Mode, Description, Label, IPv4 Begin, IPv4 End, Guest Installer Network, Host Internal Management Network, IPv4 Netmask: Relationships: Physical NICs, Virtual NICs

vApp (VMAppliance): Properties: Allowed Operations, Description, Label: Relationships: VMs

VM: Properties: HVM Shadow Multiplier, vCPUs at Startup, Maximum vCPUs, Actions After Crash, Actions After Reboot, Actions After Shutdown, Allowed Operations, Domain Architecture, Domain ID, HA Always Run, HA Restart Priority, Is a Snapshot, Is a Template, Is a Control Domain, Is a Snapshot from VMPP, Actual Memory, Description, Label, Power State, Shutdown Delay, Start Delay, User Version, Version: Relationships: Host, vApp, Guest Device, Virtual Block Devices, Virtual NICs

Virtual Block Device (VBD): Properties: Allowed Operations, Bootable, Currently Attached, Device Name, Empty, Mode, Storage Lock, Type, Unpluggable, User Device: Relationships: VM, Virtual Disk Image, Guest Disk

Virtual NIC (VIF): Properties: MAC Address, Autogenerate MAC Address, MTU, Allowed Operations, Currently Attached, Device Name, IPv4 Allowed, IPv6 Allowed, Locking Mode: Relationships: VM, Network, Guest Interface

Performance Monitoring

The following metrics will be collected every 5 minutes by default. This can be configured with the zXenServerPerfInterval configuration property. Any metric that is available either via a XenAPI get_record or rrd_updates call can be collected by adding a new XenServer XenAPI or XenServer RRD datasource to the appropriate monitoring template. Note that as of XenServer 6.2, all available metrics are collected by default.

Pools

Pool
  • property_haPlanExistsFor: Number of future host failures we have managed to find a plan for. Once this reaches zero any future host failures will cause the failure of protected VMs. (number)
  • property_haHostFailuresToTolerate: Number of host failures to tolerate before the Pool is declared to be overcommitted. (number)

Hosts

Host
  • property_memoryOverhead: Virtualization memory overhead. (bytes)
  • rrd_memoryTotal: Total memory. (bytes)
  • rrd_memoryFree: Free memory. (bytes)
  • rrd_xapiMemoryUsage: Memory allocated by xapi that is used. (bytes)
  • rrd_xapiFreeMemory: Memory allocated by xapi that is free. (bytes)
  • rrd_xapiLiveMemory: Memory allocated by xapi that is live. (bytes)
  • rrd_xapiAllocation: Total memory allocated by xapi. (bytes)
  • rrd_pifAggrRX: Total inbound throughput for all host PIFs. (bits/sec)
  • rrd_pifAggrTX: Total outbound throughput for all host PIFs. (bits/sec)
  • rrd_cpuAvg: Average CPU utilization for all host CPUs. (percent)
  • rrd_loadAvg: Load average. (processes)
  • rrd_srCacheHitsSum: Storage repository cache hit rate. (hits/sec)
  • rrd_srCacheMissesSum: Storage repository cache miss rate. (misses/sec)

Host CPUs

Host CPU (HostCPU)
  • rrd_cpu: Average CPU utilization. (percent)

Physical Block Devices

Physical Block Device (PBD)
  • No metrics available.

Physical NICs

Physical NIC (PIF)
  • metric_speed: Speed of interface. (bits/sec)
  • rrd_rx: Inbound throughput. (bits/sec)
  • rrd_tx: Outbound throughput. (bits/sec)

Storage Repositories

Storage Repository (SR)
  • property_physicalSize: Total physical storage size. (bytes)
  • property_physicalUtilisation: Used physical storage. (bytes)
  • property_virtualAllocation: Allocated physical storage. (bytes)

Virtual Disk Images

Virtual Disk Image (VDI)
  • property_physicalUtilisation: Used physical storage. (bytes)
  • property_virtualSize: Total virtual storage size. (bytes)

Networks

Network
  • No metrics available.

vApps

vApp (VMAppliance)
  • No metrics available.

VMs

VM
  • property_memoryOverhead: Virtualization memory overhead. (bytes)
  • metric_vcpusNumber: Current number of vCPUs. (number)
  • metric_memoryActual: Guest's actual memory. (bytes)
  • rrd_cpuAvg: Average utilization for all vCPUs. (percent)
  • rrd_memory: Memory currently allocated to VM. (bytes)
  • rrd_vifRXSum: Total inbound throughput for all VM VIFs. (bits/sec)
  • rrd_vifTXSum: Total outbound throughput for all VM VIFs. (bits/sec)
  • rrd_vbdReadSum: Total read rate for all VM VBDs. (bytes/sec)
  • rrd_vbdWriteSum: Total write rate for all VM VBDs. (bytes/sec)
  • rrd_memoryInternalFree: Memory used as reported by the guest agent. (bytes)
  • rrd_memoryTarget: Target of VM balloon driver. (bytes)

Virtual Block Devices

Virtual Block Device (VBD)
  • rrd_read: Read rate. (bytes/sec)
  • rrd_write: Write rate. (bytes/sec)

Virtual NICs

Virtual NIC (VIF)
  • rrd_rx: Inbound throughput. (bits/sec)
  • rrd_tx: Outbound throughput. (bits/sec)

Event Management

Zenoss watches for XenAPI messages and creates Zenoss events when they occur. XenAPI messages are the system alerts you see in XenCenter. By default, Zenoss will poll for new messages every 60 seconds. This can be configured with the zXenServerEventsInterval configuration property.

Events

The created Zenoss events will have the following fields set.

Standard Zenoss Event Fields
  • device: Set to the XenServer endpoint device in the /XenServer device class.
  • component: Looked up in from Zenoss components using the message's obj_uuid value.
  • summary: In preference order: message's body field then name field then "no body or name provided".
  • severity: Mapped from message's priority field using the map below.
  • eventKey: Message's uuid value.
  • eventClassKey: Literally "XenServerMessage".
Additional Event Fields
  • xenserver_name: Message's name value.
  • xenserver_cls: Message's cls value.
XenAPI Message Priority to Zenoss Event Severity Mapping
  • Priority 1: Critical
  • Priority 2: Error
  • Priority 3: Warning
  • Priority 4: Clear
  • Priority 5: Info

Service Impact and Root Cause Analysis

When combined with the Zenoss Service Dynamics product, this ZenPack adds built-in service impact and root cause analysis capabilities for services running on XenServer. The service impact relationships shown in the diagram and described below are automatically added. These will be included in any services that contain one or more of the explicitly mentioned components.

Impact Relationship Diagram

Internal Impact Relationships
  • XenAPI (endpoint) access failure impacts all hosts.
  • Host failure impacts the host's pool and any resident VMs.
  • Network failure impacts all related virtual NICs.
  • Physical block device failure impacts its host and storage repository.
  • Physical NIC failure impacts its host and network.
  • Pool failure impacts any contained VMs.
  • Storage repository failure impacts any pools and hosts for which it is a default, suspend image, crash dump or local cache repository.
  • Virtual block device failure impacts its VM.
  • Virtual disk image failure impacts any related virtual block devices.
  • Virtual NIC failure impacts its VM.
  • VM failure impacts its vApp.

XenServer Hosted VM in a Service

External Impact Relationships
  • Underlying server failure impacts the associated XenServer host.
  • Underlying server disk failure impacts the associated XenServer physical block device.
  • Underlying server interface failure impacts the associated XenServer physical NIC.
  • XenServer VM failure impacts the associated guest device.
  • XenServer virtual block device failure impacts the associated guest hard disk.
  • XenServer virtual NIC failure impacts the associated guest interface.
  • XenServer host failure impacts the associated CloudStack host.
  • XenServer VM failure impacts the associated CloudStack router VM, system VM or regular VM.

Usage

Adding XenServer Endpoint

Use the following steps to start monitoring XenServer using the Zenoss web interface.

  1. Navigate to the Infrastructure page.

    Add Menu Item

  2. Choose Add XenServer Endpoint from the add device button.

  3. Fill out the form.

    Add Dialog

    • Name can be anything you want.
    • Address must be resolvable and accessible from the collector server chosen in the Collector field.
    • Username and Password are the same as what you'd use in XenCenter.
    • Click ADD.

Alternatively you can use zenbatchload to add XenServer endpoints from the command line. To do this, you must create a file with contents similar to the following. Replace all values in angle brackets with your values minus the brackets. Multiple endpoints can be added under the same /Devices/XenServer section.

/Devices/XenServer loader='XenServer', loader_arg_keys=['name', 'address', 'username', 'password', 'collector']
my-xenserver-pool name='my-xenserver-pool', address='<address>', username='<username>', password='<password>', collector='localhost'

You can then load the endpoint(s) with the following command.

zenbatchload <filename>

Installed Items

Installing this ZenPack will add the following items to your Zenoss system.

Configuration Properties
  • zXenServerAddresses
  • zXenServerUsername
  • zXenServerPassword
  • zXenServerPerfInterval: Metric collection interval in seconds. Default is 300.
  • zXenServerModelInterval: Model update interval in seconds. Default is 60.
  • zXenServerEventsInterval: Events collection interval in seconds. Default is 60.
Device Classes
  • /XenServer
Modeler Plugins
  • zenoss.XenServer
Datasource Types
  • XenServer XenAPI
  • XenServer RRD
Monitoring Templates (all in /XenServer)
  • Endpoint
  • Host
  • HostCPU
  • Network
  • PBD
  • PIF
  • Pool
  • SR
  • VBD
  • VDI
  • VIF
  • VM
  • VMAppliance
  • VMGuest
Event Classes
  • /XenServer
Event Class Mappings
  • XenServerCollectionError (in /Status)
  • XenServerCollectionSuccess (in /Status)
  • XenServerMessage (in /XenServer)

Zenoss Analytics

This ZenPack provides additional support for Zenoss Analytics. Perform the following steps to install extra reporting resources into Zenoss Analytics after installing the ZenPack.

  1. Copy analytics-bundle.zip from $ZENHOME/ZenPacks/ZenPacks.zenoss.XenServer/analytics/ on your Zenoss server.
  2. Navigate to Zenoss Analytics in your browser.
  3. Login as superuser.
  4. Remove any existing XenServer ZenPack folder.
    1. Choose Repository from the View menu at the top of the page.
    2. Expand Public in the list of folders.
    3. Right-click on XenServer ZenPack folder and choose Delete.
    4. Confirm deletion by clicking OK.
  5. Add the new XenServer ZenPack folder.
    1. Choose Server Settings from the Manage' menu at the top of the page.
    2. Choose Import in the left page.
    3. Remove checks from all check boxes.
    4. Click Choose File to import a data file.
    5. Choose the analytics-bundle.zip file copied from your Zenoss server.
    6. Click Import.

You can now navigate back to the XenServer ZenPack folder in the repository to see the following resources added by the bundle.

Domains
  • XenServer Domain

Domains can be used to create ad hoc views using the following steps.

  1. Choose Ad Hoc View from the Create menu.
  2. Click Domains at the top of the data chooser dialog.
  3. Expand Public then XenServer ZenPack.
  4. Choose the XenServer Domain domain.

Changes

1.0.7
  • Licensing fixes. No functional changes.
1.0.6
  • Remove CPU count graph and datapoint
1.0.5
  • Add Analytics support.
  • Add Zenoss 5 support.
1.0.4
  • Fix "argument of type 'NoneType' is not iterable" errors. (ZEN-14856)
  • Fix potential for failing to remove storage repositories.
1.0.3
  • Fix issue where VBDs impact all VMs. (ZEN-13467)
1.0.2
  • Fix "'XenServer' object has no attribute 'device'" modeling error. (ZEN-12978)
1.0.1
  • Clear Zenoss events when messages are dismissed in XenCenter. (ZEN-11101)
  • Prevent sending of duplicate events. (ZEN-11100)
  • Tweak message priority to event severity mapping.
  • Fix timezone handling on message timestamps.
  • Add invalidation filtering to improve performance.
1.0.0
  • Initial release.

Attachments: