Jannos-443 / PRTG-VMware-Status

checks VMware VM Status for example VMware Tools, Heartbeat, CDDrive Connected and Overall State
MIT License
5 stars 1 forks source link
prtg vmware

PRTG-VMWare-Status

About The Project

Project Owner: Jannos-443

PRTG Powershell Script to monitor vmware vm status

Using VMWare PowerCLI this Script checks VMware VM Status for example VMware Tools, Heartbeat, CDDrive Connected and Overall State

Free and open source: MIT License

Features

Getting Started

  1. Make sure the VMware PowerCLI Module exists on the Probe under the Powershell Module Path

    • C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Core
  2. Place PRTG-VMware-Snapshot-Status.ps1 under C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML

  3. check if file needs to be unblocked

    • PWSH: Unblock-File C:\Scripts\Script.ps1
    • GUI: right click -> properties -> unblock

      unblock

  4. Create new Sensor

    Settings Value
    EXE/Script Advanced PRTG-VMware-Status.ps1
    Parameters -ViServer 'yourVCenterFQDN' -User 'yourUser' -Password 'yourPassword'
    Scanning Interval 10 minutes
  5. Change parameter if needed

    • Include/Exclude
    • Change Limits

Usage

Monitor all VMs with all categories

-ViServer 'yourVCenterFQDN' -User 'yourUser' -Password 'yourPassword'


Monitor all VMs with all categories but excludes all VMs starting with "TEST"

-ViServer 'yourVCenterFQDN' -User 'yourUser' -Password 'yourPassword' -ExcludeVMName '^(TEST.*)$'


Monitor all VMs with all categories but excludes "APPLIANCE1" from VMware Tools monitoring

-ViServer 'yourVCenterFQDN' -User 'yourUser' -Password 'yourPassword' -ExcludeVM_VMTools '^(APPLIANCE1)$'


Monitor all VMs with but without the "VMwareTool" monitoring

-ViServer 'yourVCenterFQDN' -User 'yourUser' -Password 'yourPassword' -HideVMTools

Examples

PRTG-VMware-Status

Includes/Excludes

You can use the variables to exclude/include VM(s)/Snapshots(s) The variables take a regular expression as input to provide maximum flexibility.

For more information about regular expressions in PowerShell, visit Microsoft Docs.

".+" is one or more charakters ".*" is zero or more charakters