Hi
We would like to be able to setup alerts on 207 response codes (Multi Status), as this indicates a soft failure within our system. The current alerting only allows for 2xx, and we do not want an alert on all the other 2xx events. Is there a way to customise this?
A great question Jurgen. I am also not sure why Alerts are restricted to a certain set of status codes and their series codes: 2xx, 4xx and 5xx. As I found this restriction is applied in the API Monitoring API itself:
https://apidocs.apigee.com/api-monitoring/apis/post/alerts
https://docs.apigee.com/api-monitoring/alerts-notifications-api
I tried creating an alert for HTTP status code 207 and it failed with the following error
curl -0 -i -H "Authorization: Bearer $ACCESS_TOKEN" https://apimonitoring.enterprise.apigee.com/alerts?org=${org_name} \ -d @- << EOF { "name":"207 Alert", "enabled":true, "description":"207 Alert", "conditions":[{ "description":"", "dimensions":{ "env":"${env_name}", "org":"${org_name}", "proxy":"${proxy_name}", "region":"ANY", "statusCode":"207" }, "metric":"count", "threshold":3, "durationSeconds":5 }], "playbook":"https://my/playbook/url", "throttleIntervalSeconds":3600, "reportEnabled":false, "organization":"${org_name}", "environment":"${env_name}", "notifications":[ { "channel":"email", "destination":"myemail@mydomain.org"} ] } EOF HTTP/1.1 400 Bad Request Date: Tue, 26 Mar 2019 01:05:52 GMT Content-Type: text/plain; charset=utf-8 Content-Length: 64 Connection: close ... {"errorCode":2,"status":400,"message":"not a valid statusCode"}
Hence, we might not be able to workaround this without updating the logic behind. I also informed Apigee Engineering team about this. They may discuss and respond to this.
xsstestrrrrrrrrrr
xsssssssssssssss
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |