Features:
THESE ACTIONS ARE EXCEPTIONALLY PERMANENT
PLEASE DO NOT USE THIS PROGRAM UNLESS THAT IS CLEAR
Actions on alerts have a soft limit of 20k at a time.
If more than 20k alerts are returned, you will need to narrow down the query (i.e. specify a date range or a single team) before proceeding.
Usage
CLOSE ALERTS:
opsgenie-cleanup-utilites closeAlerts --apiKey XXXXXX-XXXXXX --query "status:open AND source: \"Phone Call\" AND priority:P1" -v
DELETE ALERTS:
opsgenie-cleanup-utilites deleteAlerts -a XXXXXX-XXXXXX -q "status:open AND source: \"Phone Call\" AND priority:P1" -v
PURGE USERS:
opsgenie-cleanup-utilites purgeUser --apiKey XXXXXX-XXXXXX --user user@example.net -v
DELETE USERS:
opsgenie-cleanup-utilites deleteUser -a XXXXXX-XXXXXX -u user@example.net -v
Both delete and close commands will display matching TinyIDs and Messages for sanity check against expected results.
Pre-compiled versions are in bin/ folder.
Run go get bitbucket.org/robert-pratt/opsgenie-cleanup-utilities
or go build
in root directory to compile your own.