Skip to content

Instantly share code, notes, and snippets.

@jlongman
Last active October 21, 2024 14:42
Show Gist options
  • Save jlongman/45ba8456389f7f2a3db81b89ad8c5fb9 to your computer and use it in GitHub Desktop.
Save jlongman/45ba8456389f7f2a3db81b89ad8c5fb9 to your computer and use it in GitHub Desktop.
pingdom checks threshold list
#!/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