Download:
------------
Download latest version.

description:
------------
The need of our own internal check_rhevm was born because we missed some features in the check_rhev plugin which already existed.
As we are an open company too we decided to release the script under the GPLv2 license .... and helping the RHEV ecosystem a little bit :-)

Usage: check_rhevm -H -t [-w] [-c] [-s]

* = -H will be ignored when using rhevm checks, required when using rhev checks (case-sensitive)!

Example 1 (Status of hypervisor h-rhev1.example.lan)
check_rhevm -H h-rhev1.example.lan -t rhev_state

Example 2 (Retreive status of our ISO domain):
check_rhevm -H bogus -t rhevm_spools -s ISO

Example 3 (Monitor the memory load of h-rhev2.example.lan and give a warning at 85% and critical at 90%):
check_rhevm -H h-rhev2.example.lan -t rhev_memload -w 85 -c 90

The checks (-t) available:
RHEV-M:
rhevm_vmload - Display amount total and online VMs
rhevm_hosts - Total hypervisors
rhevm_spools - Check storage pools (requires the use of -s to specify storage domain)
RHEV-H:
rhev_state - Display current state of rhev server
rhev_vmload - Displays total amount of VM instances
rhev_memload - Displays memory usage (supports -w and -c as parameter, but NOT required)

Requirements:
-------------
- Nagios knowledge
- php (with simpleXML and curl support)
- RHEV 3.1 (3.0 might work though)

Installation:
-------------
Just put the script in the Nagios plugin directory or execute
it on the rhev-m server by NRPE. Just be sure the script can
connect to the API location.

After this be *SURE* you change the api_url, api_username and api_password settings.
Else it might not work :-)

You can use the following check command in the Nagios:

define command {
command_name check_rhevm
command_line $USER1$/check_rhevm -H $HOSTADDRESS$ -t $ARG1$ -w $ARG2$ -c $ARG3$ -s "$ARG4$"
}


Disclaimer:
-----------
- Use it at your own risk!
- if you don't like it, so be it! Hope we make atleast some people happy :-)
- I'm not a programmer (thank g*d!) but I did my best to make it as flawless as possible
- your free to report bugs .... I might even fix it when I have time :-)
- bugfixes/changes accepted!
- Nagios support not available

Changelog:
----------

v1.0
* First release
* Added some bugs

License:
--------
Copyright (C) 2013

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.