Hi - have looked around and cant seem to find any swql for memory usage - anyone out there able to help me with the swql - thanks
You may have some luck with this. I don't have access to a SolarWinds instance at the moment, but this should get you most of the way or at least be enough for you to tinker with. SELECT [Nodes].DisplayName , [Nodes].PercentMemoryUsedFROM Orion.Nodes AS [Nodes]# -- a Status of 1 indicates 'Up' (See Orion.StatusInfo for a complete list)WHERE [Nodes].Status = 1# -- (Not External)AND [Nodes].External = False#Not ICMP NodesAND [Nodes].ObjectSubType <> 'ICMP'
# - I'm not sure if this is the exact format to say "Anything above 90%", but i think it is. AND [Nodes].PercentMemoryUsed < 90
# -- We'll sort by Caption/DisplayName because it's convenientORDER BY [Nodes].DisplayName
There's a few different rows you could use for Memory. Memory Used and Memory available aren't as helpful, I think, as the PercentMemoryUsed and PercentMemoryAvailable for reports.
This script was made by stealing the CPU report from this doc, Enhancing Custom Query Widgets - SolarWinds Platform API - The SolarWinds Platform - THWACK, and checking out the SDK schema, SolarWinds Information Service v3.0 Schema Documentation to make it work for Percent memory used. So it could work, it could not.
thanks for the above - much appreciated, just having a slight issue on where i need to put in "AND [Nodes].PercentMemoryUsed < 90" into the SWQl, currently i have this - SELECT [Nodes].DisplayName, [Nodes].PercentMemoryUsed FROM Orion.Nodes AS [Nodes]
any help gladly appreciated
anyone able to help me here - just need script to pick up 90% memory usage - thanks
Anyone willing to help on this - thanks
Hi
With this query you will get all nodes that has a memory usage above 90%:
SELECT N.DisplayName ,N.PercentMemoryUsedFROM Orion.Nodes AS NWHERE N.PercentMemoryUsed>90
What could be a better query, depending on your needs, is to show all nodes with memory usage above critical threshold:
SELECT N.DisplayName ,N.PercentMemoryUsedFROM Orion.Nodes AS NWHERE N.PercentMemoryUsedThreshold.IsLevel2State=TRUE
Hope this helps