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.
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!
Regards,
Yaquaholic
@yaquaholic
I put the below in:
WHERE DayDiff(VirtualMachines.OldestSnapshotData, getUtcData()) >= 10AND VirtualMachines.GuestState LIKE 'Running'AND VirtualMachines.NodeStatus !=0
and it is telling me that the condition is not valid. Is everything above correct?
Thanks,
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()) >= 10AND 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
OldestSnapshotDate not OldestSnapshotData
Are you also using VMan? I don't see VirtualMachines.OldestSnapshotDate under orion.VIM.VirtualMachines in swql at all.
Do you have the Virtualization Manager (VMAN) module? If not, you won't have access to snapshot data.
@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.
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, etcFound this comparison from a few years ago, roughly still the same.https://thwack.solarwinds.com/t5/VMAN-Discussions/Virtualization-Manager-Versus-IVIM/m-p/279832/highlight/true#M1961