Jannos-443
Using VMWare PowerCLI this Script checks VMware VM Disk Latency
-
Make sure the VMware PowerCLI Module exists on the Probe under the Powershell Module Path
C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Core
-
Place
PRTG-VMware-VMDiskLatency.ps1
underC:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML
-
Create new Sensor
Settings Value EXE/Script Advanced PRTG-VMware-VMDiskLatency.ps1 Parameters -ViServer 'yourVCenter' -User 'yourUser' -Password 'yourPassword' Scanning Interval 15 minutes -
Set the "$IgnorePattern", "$ExcludeFolder" or "ExcludeRessource" Parameter to exclude VMs
example:
-IgnorePattern '^(Test-VM-123)$'
-
Optional change default Parameter LimitMAX (default = 20ms) and TimeMAX (default = 1 hour)
LimitMAX: All VMs with latency above this limit will be in the PRTG Message (Alert Limit can be controlled with the Channel Limit)
TimeMAX: 1 means that the Script searches the Max latency from the last 1 hour
Exceptions can be made within this script by changing the variable IgnoreScript. This way, the change applies to all PRTG sensors based on this script. If exceptions have to be made on a per sensor level, the script parameter IgnorePattern can be used.
For more information about regular expressions in PowerShell, visit Microsoft Docs.
".+" is one or more charakters ".*" is zero or more charakters