sched-outages.pl script, a command line tool to the scheduled outages RESTful interface

Description

Attached is a perl script which provides a command line interface to creating or updating a scheduled outage via the command line interface.

Useful when you need to create or update an existing scheduled outage with a large number of nodes.

You can specify nodes to include on the command line. It will do a database lookup to find the node ids, and any nodes that list the given nodes as their parent.

You can also give a list of surveillence categories to use as a filter for including nodes. The special character sequence %h will be replaced in any listed category with the nodes listed on the command line.

Ex: --node "yellowstone ozark denali" --category "Zones_%h" would be result in the categories "Zones_yellowstone Zones_ozark Zones_denali" being used to find nodes to add to the outage.

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Show:

Alejandro Galue April 14, 2014 at 3:59 PM

This is really cool!

I'd suggest to provide a way to override DB parameters because the script is assuming the DB is running on the same machine with the default credentials.

Also, pass a plain list of nodeId and IP Address can be useful as well (in this case the DB connection can be used to verify if the IDs and IPs are correct).

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created October 12, 2012 at 7:13 PM
Updated September 21, 2021 at 9:18 PM