New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


VMware snapshots

Votes:

0

Your Vote:

Up

Down

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.

custom-script-exe custom-sensor snapshot ssh vmware

Created on Dec 9, 2011 10:14:55 PM by  RandyB (0) 1

Last change on Mar 19, 2015 3:46:37 PM by  Martina Wittmann [Paessler Support]



8 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

I'm afraid currently there are no plans to have such sensors, sorry.

best regards.

Created on Dec 12, 2011 2:15:27 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

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

Created on Nov 9, 2012 11:28:54 AM by  Paul Huxham (0) 1



Votes:

0

Your Vote:

Up

Down

I'm afraid still only on the wish-list. Sorry.

Created on Nov 9, 2012 4:27:44 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

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]



Votes:

0

Your Vote:

Up

Down

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

Created on Jun 21, 2013 9:53:51 AM by  Jussi Lenzi (0)



Votes:

0

Your Vote:

Up

Down

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

Created on Apr 14, 2014 10:51:54 AM by  SMLunchen (0)



Votes:

0

Your Vote:

Up

Down

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!

Created on Oct 13, 2015 10:05:14 AM by  YachtCloud (120) 1 2



Votes:

0

Your Vote:

Up

Down

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.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.