-
Re: How to create dynamic query for application or interface based on node custom properties ?
HolyGuacamole Aug 31, 2015 4:32 AM (in response to MathieuJM)Unfortunately, not. Your requirement is the same as what was brought up here Create SAM group based on NPM custom properties
The open feature request for this is Use of Node Custom Properties in Group Applpication Dynamic Query
-
Re: How to create dynamic query for application or interface based on node custom properties ?
RichardLettsAug 31, 2015 4:06 PM (in response to HolyGuacamole)
While you might not be able to do it through the GUI, I think you can do it through the API as that uses the navigation properties of SWQL.
As this works:
SELECT NodeID, InterfaceID, ObjectSubType, Name
FROM Orion.NPM.Interfaces
Where Interfaces.Node.CustomProperties.Building = 'ADS'
Something like [perl snippet]
$swis->Invoke("Orion.Container", "CreateContainer", [
"$sector $building interfaces",
"Core",
"60",
0,
"Group for $sector interfaces in $building",
"true",
SOAP::Data->type('xml' => "<ArrayOfMemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion'><MemberDefinitionInfo><Name>$building interfaces</Name><Definition>filter:/Orion.Interfaces[Interfaces.Node.CustomProperties.Building='$building' AND Interfaces.Node.CustomProperties.Sector='$sector']</Definition></MemberDefinitionInfo></ArrayOfMemberDefinitionInfo>")]
);
Might work.
-