Hello friends, I hope you are well. Just under a year ago, following a video on the subject, I published the script I was writing in it, designed to automate the provisioning and removal of Pingdom alerts using BASH.
This bash script used version 2.1 of the Pingdom API which, at the time I am writing this post, is still available and functional. However, while making changes over the last few days to my StackX LAMP stack, used for the managed ScalarX services, I realised that version 3.1 of the API had been released. So I took the opportunity to port SPP to the new API. That is now done.
The differences are not huge but nevertheless require a few modifications, here are a few in no particular order: the API url must now be at the beginning of the request, authentication no longer uses an account's login/pass, but an application-specific token generated on Pingdom and, finally, when retrieving the ID to delete, it now appears after the host instead of before… which resulted in me accidentally deleting 5 or 6 alerts during my first attempts… (oops).
Usage has not changed:
To add an alert (example):
./spp.sh -n "Brain 0verride" -h "brain.stackx.run" -u "/Brain0verridetest.php" -t SX -a "add"To delete the alert (example):
./spp.sh -h "brain.stackx.run" -t SX -a "remove"In short, you can see all of this in the new version of the script, available here. Do not hesitate to send me your feedback or questions in the comments.
warm regards,
Christophe Casalegno
You can follow me on: Twitter | Facebook | LinkedIn | Telegram | YouTube | Twitch

Leave a comment
Add a comment