I have a Perl script I wrote (written/used on Linux) that we run from cron for
that. It uses the Spectrum::CLI Perl module and pulls a list of all devices in
maintenance from all landscapes, checks to see if there is a notes field, and
if there is no notes field and the device has been in maintenance for more than
3 days, it removes the device from maintenance by putting it into hibernation.
For clarity, what it does:
1. Connect to MLS (configured in script) and pull a list of all landscapes
a. filter out fault-tolerant "secondary" landscapes based on precedence
b. filter out our dedicated TrapDirector landscape
2. Get a list of all devices in maintenance
3. Enrich the data for those devices (get model class, last polled time,
notes field, and hibernation status)
4. Filter out devices that we are considering "out of scope"
a. in hibernation
b. with an entry in the notes field
c. that don't have a "last polled" time
d. interfaces (no reliable way to determine "last polled" time)
e. devices in maintenance for less than 3 days
5. For any devices left, take them out of maintenance by putting them in
"Hibernation"
a. Hibernation will get them removed from Maintenance after 3 successful
polls
i. This
prevents immediate "device unreachable" alerts for devices that are offline
We run the script from cron daily. I need to review it to make sure there's no
confidential information in it, but I can probably post it shortly.
--
Christopher P. Cashell
________________________________
EIT Platform Engineering
E-Mail: [email protected]
Infrastructure Monitoring, Management, and Automation Division EIT ~
Converging People and Technologies
West Corporation<http://www.west.com/>
________________________________
From: Stallcup, Phillip L [mailto:[email protected]]
Sent: Wednesday, September 16, 2015 9:11 AM
To: spectrum
Subject: [spectrum] Removing devices from maintenance daily
We have a problem with devices/interfaces being put in maintenance, various
reasons, but mostly to stop paging, and then being forgotten.
I have a Global Collaction that collects these, so they can be more easily
seen, however I'm looking for a way to remove everything that's in this GC from
maintenance once per day (say 8:00 am).
Anyone have any ideas?
Phillip Stallcup, CCNA
Enterprise Solutions Architect,
Information Technology
405.951.2088
[cid:[email protected]][cid:[email protected]]<http://integrisok.com/>
________________________________
This e-mail may contain identifiable health information that is subject to
protection under state and federal law. This information is intended to be for
the use of the individual named above. If you are not the intended recipient,
be aware that any disclosure, copying, distribution or use of the contents of
this information is prohibited and may be punishable by law. If you have
received this electronic transmission in error, please notify us immediately by
electronic mail (reply).
* --To unsubscribe from spectrum, send email to
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum
[email protected]<mailto:[email protected]>
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]