Monitor non-200s http errors in autograph stackdriver
Categories
(Cloud Services :: Operations: Autograph, task)
Tracking
(Not tracked)
People
(Reporter: jvehent, Unassigned)
Details
Autograph being an internal application, it should rarely, if not never, return non-200 error codes. We should monitor for elevated levels of 400s and 500s and alert as appropriate.
Comment 1•6 years ago
|
||
We discussed some options here, with the preference being for log-based metrics in stackdriver. The idea is that autograph should log HTTP responses in a Stackdriver-friendly format for parsing as log-based metrics, and we should monitor those metrics in Influx / Datadog.
An alternative option would be to have autograph send statsd metrics to a local agent (such as telegraf, datadog agent), which sidesteps the need for configuration of log-based metrics and would mean that those metrics go directly to our monitoring backend.
These exist now named user/autograph-http-errors
for prod (bobm created this one?) using the filter:
resource.type="aws_ec2_instance"
logName="projects/aws-aws-autograph-p-1535037642/logs/nginx-access"
(jsonPayload.code < 200 OR jsonPayload.code >= 300) AND (jsonPayload.code != 404)
example logs:
and in metrics viewer with count aggregation and aligner over the last week:
for stage:
filtering on:
resource.type="aws_ec2_instance" logName="projects/aws-aws-autograph-s-1534261406/logs/nginx-access" (jsonPayload.code < 200 OR jsonPayload.code >= 300) AND (jsonPayload.code != 404)
example logs:
in metrics explorer with count aggregation and aligner over the last week:
Created an alert to email autograph-notifications@mozilla.com (and not page) for non-zero http-errors https://app.google.stackdriver.com/policies/12568816315279340108?project=moz-fx-data-aws-logging
Created a similar email alert for stage https://app.google.stackdriver.com/policies/5444744706530780110?project=moz-fx-data-aws-logging currently it just emails me but other people can subscribe or we could send to autograph-notifications@mozilla.com
Description
•