This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SWIS CRUD Read Operation Scalar vs Tabular

Hi,
I can do a CRUD read operation successfully on a scalar custom poller. Difficulty arise on a tabular one.

I retrieve the following URI from a SWQL query:

swis://SERVER/Orion/Orion.Nodes/NodeID=5/CustomPollerAssignmentOnNode/ID=39/CustomPollerStatus

Then I send it to the server using this address:

https://SERVER:17778/SolarWinds/InformationService/v3/Json/swis://SERVER/Orion/Orion.Nodes/NodeID=5/CustomPollerAssignmentOnNode/ID=39/CustomPollerStatus

It returns with valid data.

But when trying on a tabular one (ie retrieve a single row from the table):

https://SERVER:17778/SolarWinds/InformationService/v3/Json/swis://SERVER/Orion/Orion.Nodes/NodeID=5/CustomPollerAssignmentOnNode/ID=54/CustomPollerStatus/CompressedRowID="1"

I get this message:

{"Message":"Invalid key properties specified for entity Orion.NPM.CustomPollerStatusOnNode.\r\nParameter name: filter","ExceptionType":"System.ArgumentException","FullException":"System.ArgumentException: Invalid key properties specified for entity Orion.NPM.CustomPollerStatusOnNode.\r\nParameter name: filter\r\n at SolarWinds.InformationService.Core.SwisUriLevelInfoParser.ValidateAndResolveFilter(IEntityType entity, SwisUriFilter filter, Boolean isHosted)\r\n at SolarWinds.InformationService.Core.SwisUriLevelInfoParser.Parse(SwisUri uri, ISchema schema)\r\n at SolarWinds.InformationService.Core.SwisUriResolver.CreateFormConsistentUrisResolver(SwisUri representantUri, IEnumerable`1 uris, Boolean queryKeysOnly, IQueryProcessor queryProcessor, IQueryPlanCache queryPlanCache, IQueryExecutionContext context, ISiteEntityLookup siteEntityLookup)\r\n at SolarWinds.InformationService.Core.SwisUriResolver.GetResolver(SwisUri uri, Boolean queryKeysOnly, IQueryProcessor queryProcessor, IQueryPlanCache queryPlanCache, IQueryExecutionContext context, ISiteEntityLookup siteEntityLookup)\r\n at SolarWinds.InformationService.Core.CrudProcessor.Read[T](SwisUri uri, IQueryExecutionContext context)\r\n at SolarWinds.InformationService.Core.InformationService.Read(String uri)"}

Can I assume it's not implemented yet (2019.4), or my URL/URI is wrong?

Christian

  • What is the initial SWQL query you are using to create the URI?

  • Hi  

    First, I get the NodeID from the IP:

    SELECT NodeID FROM Orion.Nodes WHERE IP='192.168.0.1'

    Result: 5

    Then, the CustomPollerID:

    SELECT CustomPollerID FROM Orion.NPM.CustomPollers WHERE UniqueName='mycustompoller' AND InstanceType='Orion.NPM.NodeCustomPollers'

    Result: 5f24f033-5845-41af-a130-f65f1712846d

    Get the CustomPollerAssignmentId from the NodeID and CustomPollerID:

    SELECT CustomPollerAssignmentID FROM Orion.NPM.CustomPollerAssignment WHERE NodeID='5' AND CustomPollerID='5f24f033-5845-41af-a130-f65f1712846d'

    Result: 53ff96ea-8974-4bc8-b835-1e7dd2173edf

    Get the CustomPollerAssignmentOnNode Uri(s) from the CustomPollerAssignmentId.

    SELECT Uri FROM Orion.NPM.CustomPollerStatusOnNode WHERE CustomPollerAssignmentID='53ff96ea-8974-4bc8-b835-1e7dd2173edf'

    Result (2 rows):

    swis://SERVER/Orion/Orion.Nodes/NodeID=5/CustomPollerAssignmentOnNode/ID=54/CustomPollerStatus/CompressedRowID=""1""
    swis://SERVER/Orion/Orion.Nodes/NodeID=5/CustomPollerAssignmentOnNode/ID=54/CustomPollerStatus/CompressedRowID=""2""


    I use one of the above result rows (double quotes removed) and send it on SWIS interface 17778.

    Christian

  • Thanks for the Step by Step. Testing against 2020.2 I see similar results, although to get the error you see I must alter CompressedRowID="10.199.20.1" to CompressedRowID='10.199.20.1'

    The URI looks like

    swis://AUS-VSR-PMG-024./Orion/Orion.Nodes/NodeID=25/CustomPollerAssignmentOnNode/ID=14/CustomPollerStatus/CompressedRowID="10.199.20.1"

    Passing the expected string returns "HTTP Error 404. The requested resource is not found" which suggests your assertion that this is not implemented may be correct, or this could possibly be a bug.   could you share any insight?