Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check Hyper-V 2012 health - BPA & VM
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!
-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$
-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$