Created
December 16, 2021 07:41
-
-
Save y0t4/89fe6f2ac48174a5a7e8a8f4cbcfb814 to your computer and use it in GitHub Desktop.
newrelicのalbアラートで5xx系の設定をしたい場合に使用するapiの流れ
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
curl -X GET --header "X-Api-Key: ${API_KEYを入れる}" "https://infra-api.newrelic.com/v2/alerts/conditions?policy_id=${ポリシーのid}" | jq . | |
curl -X GET --header "X-Api-Key: ${API_KEYを入れる}" "https://infra-api.newrelic.com/v2/alerts/conditions/${5xx系の監視をしたいコンディションのid}" | jq . | |
curl -X PUT 'https://infra-api.newrelic.com/v2/alerts/conditions/${5xx系の監視をしたいコンディションのid}' -H 'X-Api-Key: ${API_KEYを入れる}' -i -H 'Content-Type: application/json' -d '{"data":{"select_value": "provider.httpCodeElb5XXCount.Sum"}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment