Quantcast
Channel: THWACK: Popular Discussions - Web Performance Monitor (formerly SeUM)
Viewing all articles
Browse latest Browse all 12861

Using SDK to Unmanage/Remanage Monitors

$
0
0

I figured out how to use the SDK via Perl to get current status of our transaction monitors and this has helped greatly.

 

I am now trying to figure out how to use it to disable/re-enable transaction monitors.   We do weekly rolls, and operations would like alerting to be turned off automatically at the start of the roll for specific monitors and then turned back on at the end.

 

So I would like to be able to disable/enable transaction monitors based on names or descriptions (via a regular expression) using the SDK.  

 

Is this possible?  Anyone one got an example of this (preferably using perl).  Guessing I would use the "Invoke" method.   (actually, just as I wrote that, I did see the code at the bottom here in the sample, so this is disabling all tests on a player?)

 

So I could do a QueryXML to get a list of all transactioins, and then unmanage any that match the scripts input.

But what would the Invoke look like for this?  Something like...

    $swis->Invoke("Orion.SEUM.Transactions","Unmanage",["???", $now, $later, "false"]);

Not sure how the ??? part would look?

 

Sample doesn't include a re-manage example, how would that look?

 

 

 

# Example of Invoke operation: Unmanage node 1 for 24 hours, starting now

#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=gmtime(time);

#my $now = sprintf "%4d-%02d-%02dT%02d:%02d:%02dZ\n", $year+1900,$mon+1,$mday,$hour,$min,$sec;

#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=gmtime(time+86400);

#my $later = sprintf "%4d-%02d-%02dT%02d:%02d:%02dZ\n", $year+1900,$mon+1,$mday,$hour,$min,$sec;

#print $swis->Invoke("Orion.Nodes", "Unmanage", ["N:1", $now, $later, "false"]);

 

 

Thanks for any suggestions...   Have a feeling I'm going to be relying on the SDK a lot.


Viewing all articles
Browse latest Browse all 12861

Trending Articles



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