Home Directory Plugins Operating Systems Windows NRPE Check Hyper-V 2012 health - BPA & VM

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 Hyper-V 2012 health - BPA & VM

Current Version
0.2
Last Release Date
2016-02-16
Compatible With
  • Nagios 3.x
License
GPL
Hits
47227
Files:
FileDescription
lotp_check_hyper-v.ps1script
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check Hyper-V health through NRPE by:
-Executing and retrieving BPA Results
-Checking not running VM
-Checking not operational normally VM

Warning and Critical state are triggered on sum of:
-Number of BPA issues
-Number of VM in bad shape

You can provide a list of VM to ignore (models...).

A BPA refresh scan is triggered on every call, but in async. So the result will be read on next plugin execution.

Performance graph are provided for:
-VM not running
-VM issues
-BPA Errors
-BPA Warning

*** Need Windows Server 2012, as using Hyper-V PowerShell modules***

Latest version also available on github:
https://github.com/mathieuchateau/nsclient-plugins/
Version 0.2:
-Fix for non english servern thanks to Alexander Koch

###############################################
Tested Setup:

Monitoring Box:
-Centos 6.4 x64
-Nagios 3.4.4
-check_nrpe 2.13
-Centreon 2.4.2
-nsclient++ 0.4.1 x64 & x86
-Windows Server 2012

*** Need Windows Server 2012, as using Hyper-V PowerShell modules***

###############################################
Scripts arguments
The script accept 3 arguments:
-excludeVM (separated by commas)
-maxWarn (Warning if above, 1 by default)
-maxCrit (Critical if above, 5 by default)

###############################################
Local execution example (backslash are removed by this site):
. .lotp_check_vm.ps1
WARNING: 'VM Not Running:'2 'VM issues:'0 BPA Error:1 BPA Warning:12|VM_Not_Running=2 VM_issues=0 BPA_Error=1 BPA_Warning=12

NRPE execution:
[root~]# /usr/lib64/nagios/plugins/check_nrpe -H myHyperV -n -c check_hyper-v
WARNING: 'VM Not Running:'2 'VM issues:'0 BPA Error:1 BPA Warning:12|VM_Not_Running=2 VM_issues=0 BPA_Error=1 BPA_Warning=12
[root~]#

###############################################
Installation:
On Windows Servers:
-copy script in folder C:/Program Files/NSClient++/scripts
-enable powershell script execution without signed : Set-ExecutionPolicy RemoteSigned
-Add to nsclient.ini:
[/settings/external scripts/wrapped scripts]
check_hyper-v=lotp_check_hyper-v.ps1 -excludeVM $ARG1$ -maxWarn $ARG2$ -maxError $ARG3$

###############################################
Configuration:

For example, on Centreon:
-Add a new command:
$USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 60 -c check_vm -a $ARG1$ $ARG2$ $ARG3$
Reviews (1)
bydamned, May 17, 2017
and that's good, but there's a typo, change:
if($excludeVM -ne ""
to
if($excludeVM -ne "")