Reputation: 3098
I would like to get notified whenever my application loadbalancer gets a 5XX code from any of the instances in the target groups behind the load balancer. I then created an alarm from this type: Metric Name: HTTPCode_Target_5XX_Count.
The problem is that for some reason I don't get 0 as the number of 5XX codes as the normal behavior, as a result of this when I create an alarm based on this metric I get the following state details: State Details: State changed to INSUFFICIENT DATA. Reason: Unchecked: Initial alarm creation. So, my concern here is that maybe I won't get notified if there's an error because the alarm is not setup, I was wondering if I'm missing something.
Attached is a screenshot of what I see on the details of the Load Balancer.
Upvotes: 5
Views: 3986
Reputation: 12129
This is how ELB reports this metric. It will only publish the value if there was a 5xx response from the target. See here: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-cloudwatch-metrics.html
Reporting criteria: There is a nonzero value
Alarm setup like this will alarm you if 5xx start showing up, but the alarm may not clear when 5xx stop. I would suggest changing Treat missing data as
from Missing
to Good (not breaching threshold)
. I would also create a second alarm on one of the ELB metrics that is always published and set that one to treat missing as bad. That way you will also be notified if something happens to the ELB and it stops reporting metrics.
Upvotes: 5