diff --git a/check_webhooks.sh b/check_webhooks.sh index 7f9d27c..6654112 100755 --- a/check_webhooks.sh +++ b/check_webhooks.sh @@ -6,7 +6,7 @@ if [ -f "webhooks_result.txt" ]; then mv webhooks_result.txt webhooks_result.txt.old fi -dig +short webhooks.pagerduty.com | sort > webhooks_result.txt +curl -s https://app.pagerduty.com/webhook_ips | tr -d \[\]\" | tr , '\n' | sort > webhooks_result.txt if [ -f "webhooks_result.txt.old" ]; then DIFF=$(diff -q 'webhooks_result.txt.old' 'webhooks_result.txt' > /dev/null) diff --git a/check_webhooks_and_alert.sh b/check_webhooks_and_alert.sh index be31cf4..506af77 100755 --- a/check_webhooks_and_alert.sh +++ b/check_webhooks_and_alert.sh @@ -31,7 +31,7 @@ if [ -f "webhooks_result.txt" ]; then mv webhooks_result.txt webhooks_result.txt.old fi -dig +short webhooks.pagerduty.com | sort > webhooks_result.txt +curl -s https://app.pagerduty.com/webhook_ips | tr -d \[\]\" | tr , '\n' | sort > webhooks_result.txt if [ -f "webhooks_result.txt.old" ]; then DIFF=$(diff -q 'webhooks_result.txt.old' 'webhooks_result.txt' > /dev/null)