Jannos-443
Using VMWare PowerCLI this Script checks VMware Alerts. You can exclude specific Alarms or VMs. (see Alarm/VM exceptions) All Acknowledged Alarms/Warnings are counted but only for logging.
-
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-Snapshot-Alerts.ps1
underC:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML
-
Create new Sensor
Settings Value EXE/Script Advanced PRTG-VMware-Alerts.ps1 Parameters -ViServer 'yourVCenter' -User 'yourUser' -Password 'yourPassword' Scanning Interval 10 minutes -
Set the "$VMIgnorePattern" or "$VMIgnorePattern" parameter to exclude Alarms
example:
-AlarmIgnorePattern '^(vSphere Health detected new issues in your environment)$'
Exceptions can be made within this script by changing the variable $AlarmIgnoreScript or $VMIgnoreScript. 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 $VMIgnorePattern or $AlarmIgnorePattern can be used.
For more information about regular expressions in PowerShell, visit Microsoft Docs.
".+" is one or more charakters ".*" is zero or more charakters