Are there plans for being able to monitor snapshots in VMware? I've created a custom SSH sensor to achieve this with powershell and plink, however it is resource intensive.
8 Replies
Hello,
I'm afraid currently there are no plans to have such sensors, sorry.
best regards.
Now we're a year further on, I was just wondering if there are any plans to be able to monitor VMware virtual machine snapshots?
It would be really helpful to be able to monitor the number and age of VM snapshots.
Many thanks Paul
I'm afraid still only on the wish-list. Sorry.
I am doing just that with prtg.
Install the VMware Infrastructure (VI) Toolkit on Your probes.
Enable powershell script on probe.
Create this custom xml powershell script. Place it on Your probes and central server.
Do remember to call it with parameters like in the following decription.
And set timeout higher than 100 sec. it's a slow mofo depending on the size of Your Vmware farm offcourse :)
#--------------------------------------------------------------------------------------------- # Get the number of VM snapshots on ESX host or vCenter # # This script requires the installation of the VMware Infrastructure (VI) Toolkit for Windows. # # Args[0]:Server # Args[1]:Protocol (HTTP/HTTPS) # Args[2]:User # Args[3]:Password # Args[4]:Location (VI container(s), e.g. folders, datacenters, clusters). # Enclose in ' ' if location name contains spaces. # Args[5]:VM power state (PoweredOn, PoweredOff, * for all) # # Example 1: Snapshot count for single DRS cluster, only powered-on VMs # 10.23.112.235 https Administrator pass01 'My DRS Cluster' 'PoweredOn' # # Example 2: multiple datacenters, all VMs # 10.23.112.235 https Administrator pass01 'My Data Center 1','My Data Center 2' '*' # #--------------------------------------------------------------------------------------------- Add-PSSnapin VMWare.VIMAutomation.core >$Null $global:textvar = "" $server=Connect-VIServer -Server $Args[0] -Protocol $Args[1] -User $Args[2] -Password $Args[3]>$Null $powerstate = [string]$Args[5] $snapshot_count = 0 Get-VM -Location $Args[4] -Server $server | Get-Snapshot | ` ForEach-Object { $snapshot_count = $snapshot_count+1 } function get-snaps{ $vms = get-vm | sort name $vmsnaps = @() foreach($vm in $vms){ $snap = Get-Snapshot $vm if($snap){ $vmsnaps += $vm $snapshots = Get-Snapshot $vm foreach ($snapshot in $snapshots){ $global:textvar += $vm $global:textvar += "(" $global:textvar += $snapshot.name $global:textvar += "," $global:textvar += ([math]::Round($snapshot.sizemb/1024,2)) $global:textvar += ")" $global:textvar += " - " } } } } get-snaps $x=[string]$snapshot_count+":"+$global:textvar #write-host "$snapshot_count" if($snapshot_count -ne 0){ write-host "<prtg>" write-host "<error>" write-host "1" write-host "</error>" write-host "<text>" write-host $global:textvar write-host "</text>" write-host "</prtg>" } if($snapshot_count -eq 0){ write-host "<prtg>" write-host "<result>" write-host "<channel>Snapshots running</channel>" write-host "<value>" write-host $snapshot_count write-host "</value>" write-host "<LimitMaxError>0</LimitMaxError>" write-host "<LimitMode>1</LimitMode>" write-host "</result>" write-host "</prtg>" }
Created on Jan 25, 2013 4:35:10 PM by
klask
(0)
Last change on Jan 28, 2013 1:38:38 PM by
Torsten Lindner [Paessler Support]
Hello
I'm getting following error in prtg with your powershell script:
Error reading response: XML Parser mismatch: Wanted </<<<>, got </prtg>
can you help me?
Many thanks Jussi Lenzi
Hi, if the check runs into an error, let the output write to disk and analyze the logfile. Mostly there are powershell errors in this logfile.
Regards SML
Any news on this one? We recently had a couple of issues with Orphaned snapshots which cost total server outage.
Would be good to be able to monitor this!
Hi YachtCloud,
Did you try the provided script by klask? Next to this, it's still on the wish list and you will need to write your own Custom Sensor for the moment, sorry.
Best regards, Felix
Created on Oct 14, 2015 9:23:45 AM by
Felix Saure [Paessler Support]
Last change on Jul 24, 2018 7:36:59 AM by
Brandy Greger [Paessler Support]
Please log in or register to enter your reply.
Add comment