$ TOKEN=""; DETECTOR=""; while true; do data="$(curl -sk -H "X-SF-Token: $TOKEN" "https://api.signalfx.com/v2/detector/$DETECTOR/incidents" | jq -r '.[].events[]')"; if [[ -z $data ]]; then echo "** DONE **"; break; else echo $data | while read i; do echo "=> Incident: $i"; curl -sk -X PUT -H "X-SF-Token: $TOKEN" "https://api.signalfx.com/v2/incident/$i/clear"; done; fi; done
NOTE: This command checks for pages of results until none are left. This will clear ALL alerts from your specified detector.
https://developers.signalfx.com/docs/incidentidclear
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
29-Sep-2026
|
Initial Release |