3 Replies Latest reply on Oct 3, 2014 3:41 PM by herwig

    Automating Additional Device Poller device assignment...

    herwig

      I think about creating a SWIS script assigning orion monitored nodes to different additional device pollers dynamically based on different source criteria.

      One basic example would be to automatically assign nodes in a 50:50 share between the main- and one additional device poller.

      But maybe it would also be useful to be able to assign based on device groups or any other criteria...

       

      This script could be running once per day, so the admin doesn't have to take care about manual assignments like it is currently necessary within Orion Web GUI.

       

      Basic question:

      Is the dbo.Nodes table the only place within Orion database where this assignment: Node to Poller is done? Then it would be an easy job to do....

       

      Thanks for any hint!

        • Re: Automating Additional Device Poller device assignment...
          tdanner

          You can use SWIS to update the EngineID value on the Orion.Nodes entity to reassign nodes from one polling engine to another. (Set-SwisObject in powershell)

          1 of 1 people found this helpful
            • Re: Automating Additional Device Poller device assignment...
              herwig

              Are you sure that altering the Nodes table is sufficient for assigning nodes to different polling engines?

              Looks like it could break some references with other tables in Orion DB....?

               

              Below a list of all Columns called EngineID occuring in Orion DB:

               

              SELECT * FROM information_schema.columns WHERE COLUMN_NAME = 'EngineID'

               

              Nodes EngineID

               

              ActiveAlerts EngineID

              VoIPInterface EngineID

              Alerts EngineID

              AlertSuppression EngineID

              Engines EngineID

              Events EngineID

              DiscoveryProfiles EngineID

              DiscoveryIgnoredNodes EngineID

              IPAM_Engine EngineId

              SysLogRules EngineID

              EngineProperties EngineID

              NCM_NCMSettings EngineID

              NCM_JobEngineNCMJobs EngineID

              NCM_Nodes EngineID

              TrapRules EngineID

              cbQoSPollerJobs EngineID

              Traps EngineID

              SysLog EngineID

              NetFlowSnmpJobs EngineID

               

              Thanks for your comments....

            • Re: Automating Additional Device Poller device assignment...
              herwig

              fyi, I got confirmed that it is sufficient to change the EngineID in the Nodes table

              Currently we do this directly via scheduled SQL job, maybe we'll trigger this by script in future through the API....

               

               

              change the bottom 50% of the Nodes table:

               

              UPDATE X SET EngineID =

              (SELECT EngineID FROM Engines WHERE ServerName = '[POLLER SERVER X]')

                FROM

              (SELECT TOP 50 PERCENT * FROM Nodes ORDER BY NodeID DESC)

                X

               

               

              change the top 50% of the Nodes table:

               

              UPDATE Y SET EngineID =

              (SELECT EngineID FROM Engines WHERE ServerName = '[POLLER SERVER Y]')

                FROM

              (SELECT TOP 50 PERCENT * FROM Nodes ORDER BY NodeID ASC)

                Y