Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

How to create an alert for older Snapshots on a VM?

I am needing to create an alert that alerts us when a snapshot has been on a VM for 3 days or longer. I am not able to find anything on this. Thanks for you help on this. 

0 Kudos
13 Replies

@shuth is right if you don't have VMAN you won't be able to obtain snapshot data. Once you do have VMAN there would also be an out-of-the-box alert for this condition you could use as a template to build it out as well.

@christopher.t.jones123 @shuth I did not know you HAD to have the Virtualization Manager in order to create this alert. We currently do not have this in our environment.

Appreciate all the help everyone. If anyone every finds a way around this, i'm all ears. 

0 Kudos

There are two types of virtualization polling in SolarWinds.
Basic - comes with the Orion platform (i.e. NPM, SAM). Gets you basic monitoring of the vCenter, clusters, datacentres, ESX hosts, VMs status and some basic VM metrics if you monitor them as nodes.

VMAN Orion - needs the Virtualization Manager module (VMAN). Gives more indepth metrics about your hypervisors, snapshot data, provides info on underutilised/overutilised VMs, recommendations, capacity planning, etc

Found this comparison from a few years ago, roughly still the same.


Do you have the Virtualization Manager (VMAN) module? If not, you won't have access to snapshot data.

0 Kudos
Level 14

Hi Troye23,

Create a new alert that runs every 12 or 24 hours with a SWQL trigger such as:


The above SWQL triggers when any snapshot over 10 days old is discovered.


I hope it helps!



Tags (2)


I put the below in:

WHERE DayDiff(VirtualMachines.OldestSnapshotData, getUtcData()) >= 10
AND VirtualMachines.GuestState LIKE 'Running'
AND VirtualMachines.NodeStatus !=0


and it is telling me that the condition is not valid. Is everything above correct? 



0 Kudos

I have just tested the SWQL in the Orion SDK SWQL Studio and it works fine (for me).


Here's the code in a more copy'pasta friendly format:

SELECT VirtualMachines.Uri, VirtualMachines.DisplayName FROM Orion.VIM.VirtualMachines AS VirtualMachines

WHERE DayDiff(VirtualMachines.OldestSnapshotDate, getUtcDate()) >= 10
AND VirtualMachines.GuestState LIKE 'Running'
AND VirtualMachines.NodeStatus != 0


Proof I ain't pulling your plonker 😉




I must admit that we are still running Orion Platform 2017.1.3, but it should still work.

If you don't have SWQL Studio (I would recommend you get it) then use https://<your orion server>/Orion/admin/swis.aspx 







0 Kudos

Are you also using VMan? I don't see VirtualMachines.OldestSnapshotDate under orion.VIM.VirtualMachines in swql at all.

0 Kudos

OldestSnapshotDate not OldestSnapshotData 😀

0 Kudos

Do you have to have  SWQL Studio in order for this to work because it still doesn't work for me and we are on version: 2020.2

0 Kudos

SWQL studio would be the best place/way to test queries before putting them into the actual orion site. It's included in the Orion SDK and is a daily use tool for me in our environment. 


0 Kudos

Yeah I can't get anything to work on my end... any other suggestions on how to set this alert up? 

0 Kudos

Hi, sorry been a really busy few days....


Event without the SWQL Studio - you can use the built in Orion SWQL tool. 🙂  

Point your browser at https://<your Orion server>/Orion/admin/swis.aspx any you'll get a basic SWQL tool, where you test/play.

If you can find Orion.VIM.VirtualMachines in the dropdown then the above SWQL will work, if not then I am unsure if the snapshot data is available without creating a script to get the data.

I used my favourite search engine and searched for "vmware PowerCLI snapshot age powershell", which provided plenty of examples that would get you started. Sorry I can't help more than that right now.


0 Kudos