Last active
October 21, 2024 14:42
-
-
Save jlongman/45ba8456389f7f2a3db81b89ad8c5fb9 to your computer and use it in GitHub Desktop.
pingdom checks threshold list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# get your api key from https://my.pingdom.com/app/api-tokens | |
SECRET="$1" | |
# | |
ids=$(curl -s -X GET https://api.pingdom.com/api/3.1/checks -H 'Authorization:Bearer '"${SECRET}"| jq '.checks | .[] | .id ') | |
echo "| name | threshold |" | |
for id in $ids; do | |
curl -s -X GET https://api.pingdom.com/api/3.1/checks/"${id}" -H 'Authorization:Bearer '"${SECRET}"| jq -r '.check | "| \(.name): | \(.responsetime_threshold) ms |"'; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment