Reply

Script to add/remove discovery blackout on device

Authority
Posts: 32
4624     0

I'm looking for a more efficient way to put devices in and out of discovery blackout in NetMRI. When a device goes down on the network for longer than the NetMRI retention period (7 days), the device gets deleted and we lose all of our config backups. To remedy this, I created an expanded device group with discovery blackout enabled 24/7. Any device added to that group goes into blackout, and if it is down for 7 days or more, it doesn't get deleted. However, once the device comes back online, you have to manually remove it from the group so that it is monitored again.

 

I'd like to script the above process by doing the following:

 

1. Add the device to the blackout device group

2. Remove it from the device group on a specific date/time (possibly by creating another job that runs at that time).

 

Can someone provide an example of how to do this in CCS or Perl?

 

Thanks.

 

Steve

Re: Script to add/remove discovery blackout on device

Adviser
Posts: 425
4624     0

May I ask why you need to have a blackout on a Router/Switch for 24/7?

 

Also, you can extend the Retention period to greater than 7 Days in the Advance Settings

 

You will have to do this with PERL or Python via the API

If you still need a script after changing the settings let me know.

 

Sif

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Highlighted

Re: Script to add/remove discovery blackout on device

Authority
Posts: 32
4624     0

Sif,

 

The switch or router is offline for an extended period of time (more than 7 days) for things like renovations. We want to retain the configs past the 7 days in case we need to restore from backups when the device comes back online.

 

We have determined that 7 days is long enough for the retention. When devices are actually removed permanently from the network, we don't want them in NetMRI for too long afterward.

 

A script would be awesome if you can do that.

 

Thanks!

 

Steve

Showing results for 
Search instead for 
Do you mean 

Recommended for You