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.

Removing Universal Device Pollers after converting to agent polling

We've standardized on agent polling for our Cloud-hosted servers for lots of great reasons.  Security, both in reduced firewall requirements as well as encryption in transit, were big drivers as was data compression, expanded functionality for Linux-based servers (no more net-snmp machine types!), not to mention the ability to get away from a service account for Windows boxes.

While doing some deployments the other day I started to dig through the database looking for some data when I realized that the UnDPs were still assigned AND collecting data for nodes that I had switched from SNMP to Agent polling.  This is odd because UnDPs are not supported with the agent.  Go ahead and try it for yourself.  Set up a Linux box.  Poll it via SNMP, assign some UnDPs and then convert to an agent.  Here is what you will find.

1)  Orion still thinks there is something to display even though the data is no longer being collected (the screenshot below was taken on 2017-05-27)

pastedImage_0.png     pastedImage_1.png

2)  The CustomPollerAssignment table still has entries for that server

pastedImage_2.png

3)  You can no longer see the pollers via Manage Nodes > Assign Pollers or via the Orion Universal Device Poller 32-bit application.  (To be fair, you can see the assignment in the All Defined Pollers section of the 32-bit app but since you can't manage the assignments from within that view and must use the All Nodes view, and since the all nodes view doesn't show nodes that are polled by the agent, you can't actually remove the assignments to the node.)

pastedImage_3.png

I would love if there were a programmatic way to remove UnDP assignments but I couldn't find one.  Anyone have any ideas?  For nodes that are in the midst of being converted I can either a) delete the UnDP assignments before I swap them to the agent or b) delete them entirely (the historical data gets whacked anyway) and then just re-add them, but I don't have a solution for the hundred of so nodes I've already migrated.

Bueller?

  • Hmmm... may be no way to clear this up without fiddling with the database. This query should show all nodes that are polled via the agent, with UnDP assignments and data.

    ###############

    SELECT stat.CustomPollerAssignmentID AS OrphanedAssignment, Nodes.NodeID, Nodes.Caption

        FROM CustomPollerStatistics_Detail stat

            LEFT OUTER JOIN CustomPollerAssignment undp

                ON undp.CustomPollerAssignmentID = stat.CustomPollerAssignmentID

      LEFT OUTER JOIN Nodes

      ON Nodes.NodeID = undp.NodeID

        WHERE Nodes.ObjectSubType = 'Agent' /* match only nodes polled via agent */

    ################

    If flipping it around to delete the data... note I believe there are multiple statistics tables for UnDPs, and then the assignment itself would have to be deleted. I'd work with support and get their thoughts, prayers etc.

    Hope this helps!

  • Thanks for the query.  I haven't yet opened a case but it is definitely on my list of things to do.  I don't like to delete from the DB directly whenever possible as you never know what things should be deleted to coincide with my updates.  Better to use the API and make sure all the things happen in the proper order.