I'm trying to use the Orion.Container.CreateContainer verb in the SDK to create a group with a dynamic query that allows me to utilize more than use the = (is) operator. In the documentation and the example, all of the filters utilize only the = operator. In the UI, we have more operators, as seen in the image below:
Is it possible to utilize the other operators and if so, does anyone have a list of the expected operators in the filter? Here's a sample of what I'm doing in PowerShell:
$members = @(
@{ Name = "Subnet 192.168.10.0/24"; Definition = "filter:/Orion.Nodes[IP_Address LIKE '192.168.10.%']" },
@{ Name = "subnet 192.168.11.0/24"; Definition = "filter:/Orion.Nodes[IP_Address LIKE '192.168.11.%']" }
)
$groupId = (Invoke-SwisVerb $swis "Orion.Container" "CreateContainer" @(
# group name
"Children - Site A",
# owner, must be 'Core'
"Core",
# refresh frequency
120,
# Status rollup mode:
# 0 = Mixed status shows warning
# 1 = Show worst status
# 2 = Show best status
1,
# group description
"Nodes that are dependent on group Parent - Site A.",
# polling enabled/disabled = true/false (in lowercase)
"true",
# group members
([xml]@(
"<ArrayOfMemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion'>",
[string]($members |% {
"<MemberDefinitionInfo><Name>$($_.Name)</Name><Definition>$($_.Definition)</Definition></MemberDefinitionInfo>"
}
),
"</ArrayOfMemberDefinitionInfo>"
)).DocumentElement
)).InnerText
The group shows up in red status and when I try to edit the dynamic query, I get the following:
I was expecting to see something similar to the first screenshot. Your help is appreciated!