Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Unmanage & Remanage verbs do not update in SDK 1.3 w/ NPM 10.2

$
0
0

I've installed the 1.3 SDK and have written a Powershell script to unmanage and remanage nodes using the provided Verbs:

Unmanage:

    $nodename=$args[0]

   $nodeid = Get-SwisData $swis "SELECT NodeID FROM Orion.Nodes WHERE SysName like '$nodename' or IP_Address like '$nodename'"

   $now=[DateTime]::Now

   $later=$now.AddMinutes(15)

   Invoke-SwisVerb $swis Orion.Nodes Unmanage @("N:$nodeid",$now,$later,"false")

Remanage:

   Invoke-SwisVerb $swis Orion.Nodes Remanage @("N:$nodeid")

When using "Unmanage", the Nodes.Status column in the database stays set to 9 and Node.GroupStatus remains as "Down.gif" even after Node.Unmanaged is set to 0 after 15 minutes.

Similarly, when using "Remanage", the Nodes.Status column in the database stays set to 0 and Node.GroupStatus remains as "Unknown.gif" even though Node.Unmanaged is set to 0.

Additionally, I am getting Node Down alerts for Nodes that have been Unmanaged through the PowerShell script.

I had previously been using my own Perl script to modify the database:

 

   $sql = "UPDATE Nodes SET Status=9, UnManageUntil='" . $endtime . "' WHERE NodeID = $nodeid";

 

As of 10.2 my own script stopped working, and SolarWinds support staff suggested I move to use the API.  In the event, it's no better - and actually a little worse - to use the API!

 

I'm looking to see if anyone's run into this and found a solution, or if the SolarWinds development team can help with this.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(Background info for those who may find the approach useful)

We have > 2000 hosts that are monitored with SolarWinds, most of which are on a weekly reboot job.  So that we don't get spurious alerts for machines that are rebooted like this (or rebooted in an orderly fashion by an SA rather than crashing), we have set up:

 - An init script that on shutdown logs an "orderly shutdown" event via syslog

 - Orion NPM receives these log messages, and has a filter rule that executes our unmanage script with "${Hostname}" as an argument

 - This takes our servers out of monitoring for 15 minutes so we don't get alerted on scheduled reboots or those that we already know about.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 

Thanks in advance for any help!

 

     Cheers

     Jay


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>