Query SWIS with PowerShell
The Invoke-SwisVerb cmdlet argument lists support XmlElement objects from Orion SDK 1.5. If your scripts rely on the original behavior, update them to use the InnerText property of the returned element. Installing SWIS PowerShell
If you installed the Orion SDK to a different folder, adjust the path to SwisPowerShell.dll accordingly. The same DLL works in both 32- and 64-bit shells, but you have to register it separately for each context. Don't forget that you need to run the Powershell as Administrator. |
SWQL supported constructs
Credit
|
SWQL unique
SWQL - NOT SUPPORTED
You must use CRUD operations to create, read, update, or delete entities. |
Cheatography
https://cheatography.com
SolarWinds SWIS API Cheat Sheet by ernest
SolarWinds exposes Information Service (SWIS) to customers. The service is accessible from PowerShell and this cheat sheet aims to simplify using it. Information within this cheat sheet is based on SolarWinds Orion SDK 1.5.
Created By
Metadata
Comments
AK 13:50 30 Sep 15
SWQL - NOT SUPPORTED says You must list the actual properties you want to select.
How do you get a list of all available properties? Apparently, not all table column names work.
Brian McMahon 09:53 18 Oct 15
Yes, a major short coming of the SW PowerShell "integration" is the lack of metadata information for valid properties for a given node. This will give you a full listing of properties, but about half of the returned list are invalid for a Windows node: $allProps = Get-SwisData $swis "SELECT Name FROM Metadata.Property where EntityName = 'Orion.Nodes'" It appears that depending on the node type, certain properties are valid, others aren't. I don't know if there is a way to return only the valid properties for a node type without trial and error. This means you end up with a select statement like this: $nodeInfo = Get-SwisData $swis "SELECT NodeID, ObjectSubType, IPAddress, IPAddressType, DynamicIP, Caption, NodeDescription, Description, DNS, SysName, Vendor, SysObjectID, Location, Contact, VendorIcon, Icon, IOSImage, IOSVersion, GroupStatus, StatusIcon, LastBoot, SystemUpTime, ResponseTime, PercentLoss, AvgResponseTime, MinResponseTime, MaxResponseTime, CPULoad, MemoryUsed, MemoryAvailable, PercentMemoryUsed, PercentMemoryAvailable, LastSync, LastSystemUpTimePollUtc, MachineType, Severity, ChildStatus, Allow64BitCounters, AgentPort, TotalMemory, CMTS, CustomPollerLastStatisticsPoll, CustomPollerLastStatisticsPollSuccess, SNMPVersion, PollInterval, EngineID, RediscoveryInterval, NextPoll, NextRediscovery, StatCollection, External, Community, RWCommunity, IP, IP_Address, IPAddressGUID, NodeName, BlockUntil, BufferNoMemThisHour, BufferNoMemToday, BufferSmMissThisHour, BufferSmMissToday, BufferMdMissThisHour, BufferMdMissToday, BufferBgMissThisHour, BufferBgMissToday, BufferLgMissThisHour, BufferLgMissToday, BufferHgMissThisHour, BufferHgMissToday, OrionIdPrefix, OrionIdColumn, MinutesSinceLastSync, EntityType, DetailsUrl FROM Orion.Nodes order by nodeid" Pretty ridiculous, huh?
Mark Roberts 15:35 11 Jan 16
I would suggest you install the SWQL Studio application, which has just been upgraded to v2. This will allow you to view all of the SWQL column names for all of the supported entities in Orion.
SolarWinds have created a GitHub site for the SDK so new versions will be available via that resource - https://github.com/solarwinds/OrionSDK
Add a Comment
Related Cheat Sheets