Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check XenServer

Current Version
1.3
Last Release Date
2014-05-03
Compatible With
  • Nagios 3.x
Owner
License
GPL
Hits
41814
Files:
FileDescription
check_xenserver.pycheck script
parse_rrd.pyRRD parsing toolbox
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check Xenserver through its API (http://www.xenserver.org/partners/developing-products-for-xenserver.html)


Ability to check :
- Memory of all hosts in a pool (check_mem)
- CPU of all hosts in a pool (check_cpu)
- Storage Repositories in a pool (check_sr)
- Availability of hosts in a pool (check_hosts)

Also renders performance data.

See github project for more details
Nagios check plugin for xenserver

Usage: ./check_xenserver.py [warning level %] [critical level %]
see online help for more informations

Config file follows ini format. In the [general] section, define the performance data format : can be "pnp4nagios" or other. The name of the other sections are references, mandatory fields are :

- host: ip or name of the pool master
- username
- password
- exclude_SRs:

Uses https to connect to XenServer, if you have a pool, use a poolmaster IP/FQDN
Uses (python) XenAPI, download it from XenServer http://www.xenserver.org/partners/developing-products-for-xenserver.html and parse_rrd
Credit for most of the code goes to ppanula, check http://exchange.nagios.org/directory/Plugins/System-Metrics/Storage-Subsystem/check_sr-2Epy/details for original code

Dated: 03/05/2014 Version: 1.3

Version history:

v1.0: Initial release
v1.1: Config file support + return code for check_hosts
v1.2: Bug fixes : return status for SRs and Mem, perfdata format Features : service output for SRs and Mem,
v1.3: Rewrite of the argument parsing Code refactoring Ability to check a single SR
Reviews (5)
byS3nd0h, March 17, 2021
I got the same problem as Carambar "CRITICAL - Connection Error" Xen Server 7.2"
byCarambar, July 10, 2020
Hello,
I have a problem with the script when I execute the cmd : "/usr/lib/nagios/plugins/XenAPI/XenAPI-2.14/check_xenserver.py xencasa2 check_xenserver.ini check_cpu 80 95"

I get a "CRITICAL - Connection error", the credentials in check_xenserver.ini are valid
Do you know what is the problem ?
My xen version is 6.5

Thanks in advance,
how to pass more than one SR in single script execution. at present i can SR utilz for only one.
It works okay, but I couldn't get pnp4nagios to like the performance data. No charts were created. If you only need monitoring and alerting, this might be okay for you.

I'm also not sure I found the correct version of the files. Both Nagios Exchange and the GitHub website say v1.3 is available, but inside the files I downloaded it had an older version number (1.2), older date, and older version history.
byxoroz, July 14, 2016
1 of 1 people found this review helpful
Thank you for the plugin.
I tried it worked quite well. This is how I used it:

check_xenserver.py poolge65_2 check_xenserver.ini check_sr --name FREENAS02GE-NFS 90 95
check_xenserver.py poolge65_2 check_xenserver.ini check_cpu 80 95
check_xenserver.py poolge65_2 check_xenserver.ini check_mem 80 95
check_xenserver.py poolge65_2 check_xenserver.ini check_hosts

check_xenserver.ini
[poolge65_2]
host: xenserver02
username: blublu
password: blabla
exclude_srs: SR1, SR2

Comments:
Noticed that without exclude_srs the script breaks.
Would have been nice to be able to get individual VM CPU/Memory. Think it can be done? :)

thank you