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.

Bulk Updating 'Application Dependency Polling Enabled'

Sometimes updating in bulk through the UI can be cumbersome, and so the Orion API exposes methods to accomplish the most frequent tasks. Some other times however it may be necessary to go straight to the DB to perform the necessary updates.

In this example, a user needs to make changes to a list of  NodeIDs in the ADM_NodeSettings table. The list of target agents of interest is in the AgentManagement_AgentPlugins table which does not include the NodeID, but rather the AgentID  Joining on the AgentManagement_Agents table the following query will make the required update.

UPDATE ADM_NodeSettings SET enabled = 0 WHERE nodeid IN 
(
    (
        SELECT DISTINCT(AG.NodeId)
        FROM AgentManagement_AgentPlugins AP
        INNER JOIN
        AgentManagement_Agents AG ON AP.AgentId = AG.AgentId
        WHERE StatusMessage IS NULL
    )
)

And of course, as always, make sure you have a backup of your DB before making any changes and never test in production :-) If you like to be extra cautious start a transaction with

BEGIN TRANSACTION;


Then execute your query, if the number of rows updated mathces your expectations, you can
COMMIT

or if not
ROLLBACK
Parents
  • - just want to say thanks for this information. I was struggling to find a way to disable this functionality and this got me on the right track. Although my findings are a bit different to note though. The settings are not there in the database to update unless they are manually overridden first. Perhaps a specific thing with my environment... I'm looking to automate the disabling of this functionality and I found I need to actually insert records into this table to do so for the vast majority of my nodes.

Reply
  • - just want to say thanks for this information. I was struggling to find a way to disable this functionality and this got me on the right track. Although my findings are a bit different to note though. The settings are not there in the database to update unless they are manually overridden first. Perhaps a specific thing with my environment... I'm looking to automate the disabling of this functionality and I found I need to actually insert records into this table to do so for the vast majority of my nodes.

Children
No Data