Trying to Enable AssetInventory on Server Nodes via SDK

I am trying to follow this article to enable Asset Inventory on my Servers (selected via Custom Property).  We have some that have SAM templates applied (agents), some being monitored via WMI (most of them) and some monitored via SNMP.  Currently on version 2023.4.2 with SAM installed and some licenses in use.
I was told by a sales engineer that the node won't need to consume a SAM license to enable this feature.

I have isolated the nodes in a query, used the Concat to put the NodeIDs into the format required for the "Orion.AssetInventory.Polling.EnablePollingForNodes" Invoke but when I paste the <int>NODEID</int> into the invoke command array I get a 'false' returned in the bottom window.  I have tried multiple NodeIDs, both in bulk and singly. 
I have looked at the log that the article says to look at and I don't see errors related to this unless they are showing something different than expected (such as complaining about AIops or something).
I have also tried to limit it down to just WMI polling nodes but that didn't seem to work either.

The SDK shows this should be read-only with false for Create and Update but the article says it's possible.  Any ideas?

This is what the invoke looks like:

<ArrayOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
	<int>4958</int>
	<int>5068</int>
	<int>4949</int>
	<int>5236</int>
	<int>4951</int>
	<int>5071</int>
</ArrayOfint>


And returns this:

<Return xmlns="http://schemas.datacontract.org/2004/07/SolarWinds.InformationService.Contract">false</Return>

Parents
  • The EnablePollingForNodes verb takes the nodeIds as an array.  From the outside, it looks like the XML you provided does meet the necessary requirements.

    That said, I'm not 100% sure the node selection script in the above support article is what you need.

    The way I understand it, the Orion.AssetInventory.Polling entity contains only those elements which are already flagged for Asset Inventory.  In other words, the Enabled value serves no purpose.  If it's in the list, then it's being polled for assets.

    Therefore, the code provided in the article (below) will return things with Asset Inventory already created.

    SELECT CONCAT('<int>', NodeID, '</int>') AS col1
    FROM Orion.AssetInventory.Polling

    This would be fine if you wanted to remove something from Asset Inventory.

    I think the query you are looking for to generate the list of IDs to be added to Asset Inventory might be closer to: (tweak to your needs)

    SELECT [Nodes].NodeID
         , [Nodes].Caption
         , [Nodes].ObjectSubType
    FROM Orion.Nodes AS [Nodes]
    WHERE [Nodes].ObjectSubType IN ( 'Agent', 'WMI' )
      AND [Nodes].Vendor = 'Windows'
      AND [Nodes].NodeID NOT IN (SELECT [PolledNodes].NodeID
          FROM Orion.AssetInventory.Polling AS [PolledNodes]
      )

    So for the XML you're trying to generate, it would be:

    SELECT CONCAT('<int>', [Nodes].NodeID, '</int>') AS [XmlArrayEntry]
    FROM Orion.Nodes AS [Nodes]
    WHERE [Nodes].ObjectSubType IN ( 'Agent', 'WMI' )
      AND [Nodes].Vendor = 'Windows'
      AND [Nodes].NodeID NOT IN (SELECT [PolledNodes].NodeID
          FROM Orion.AssetInventory.Polling AS [PolledNodes]
          WHERE [PolledNodes].Enabled = 'TRUE'
      )

    I only had one such in my environment and was able to get a return value of TRUE when I put it in the array list for Orion.AssetInventory.Polling.EnablePollingForNodes.

  • Unfortunately this gives the same 'false' message that I had before (and of course no context about why). 
    Still not seeing anything in that log that seems to pertain to this action. 
    With my initial query I was seeing 110 nodes without AssetInventory polling enabled, your query returns 36 nodes.
    After plugging the resulting 36 XML array into the Invoke and running it, still getting 36 returned when I re-run the query.

    I should have posted my earlier query as well, I was filtering down to nodes that were not enabled for Asset Inventory polling

    select caption, CONCAT('<int>', NodeID, '</int>') AS col1, N.AssetInventory.Enabled, N.ObjectSubType
    from Orion.Nodes N
    where N.CustomProperties.NodeType like 'Server'
    and N.AssetInventory.Enabled is NULL
    and N.ObjectSubType not like 'ICMP'
    and N.ObjectSubType not like 'SNMP'
    order by Caption

  • Dumb question of the day: what happens if you only send one node?

    <ArrayOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <int>4958</int>
    </ArrayOfint>

    Can you post the actual XML you are sending (Insert > Code : Type XML)?

  • I spot checked 5 of the 36 nodes and got the same 'false'.  

    Here is the XML

    <ArrayOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <int>5077</int>
    </ArrayOfint>

  • Interesting - and if you go (in the web console) to Manage Nodes and then List Resources on that device, Asset Inventory is still unchecked?

  • Well, I had not been limiting by vendor=Windows and after doing so I only end up with 13 nodes showing.  I then tried a couple for List Resources and they time out or had been marked unmanaged.  Added Status to the query and only have a few showing status of 1 and those seem to have some kind of polling issue.
    I guess I was chasing a ghost on this one as all of the servers I have spot checked have asset management turned on and I was seeing a bunch of Linux hosts (which apparently don't have the same functionality with Asset Inventory).

  • Ah - that makes sense.  Sorry I didn't think about those filters first.  In a home lab, I rarely have to worry about Unmanaged, but I should have remembered and brought it up.

  •   - To close this full circle, would you be willing to share the Query you used to identify Windows Servers, Not Unmanaged, etc. you used?  That way, anyone else who happens upon this thread can find the solution.

  • SELECT [N].Caption
         , CONCAT('<int>', [N].NodeID, '</int>') AS col1
         , [N].AssetInventory.Enabled
         , [N].ObjectSubType
         , [N].Status
    FROM Orion.Nodes AS [N]
    WHERE [N].AssetInventory.Enabled IS NULL
         AND [N].ObjectSubType NOT IN ( 'ICMP', 'SNMP' )
         AND [N].Vendor = 'Windows'
         AND [N].Staus <> '9'
         -- This is my filter on the Node's Custom Property called 'NodeType'
         AND [N].CustomProperties.NodeType LIKE 'Server'
    ORDER BY [N].Caption

  • Thanks for providing the query!  I flagged this forum question as Answered.

Reply Children
No Data