HO-CTO / sre-monitoring-as-code

Monitoring-as-Code (MaC) is a jsonnet mixin implementation of SLIs/SLO/Error Budgets using the open-source monitoring and alerting eco-system of Prometheus and Grafana.
https://ho-cto.github.io/sre-monitoring-as-code/
MIT License
23 stars 15 forks source link

investigate EC2 Status check metric when there is no data #640

Closed georgeowusuHO closed 11 months ago

georgeowusuHO commented 11 months ago

As par of SRE-1031/1078 LIGv2 onboarding in yellow it was noticed that when all EC2 instance where terminated e.g ipn-aut for a long while the Status seemed to imply that the EC2 was running e.g status 1 as show below

image001

The code for the graph is shown below

ec2CheckBefore

A POTENTAIL FIX IS TO USE BELOW QUERY

ec2CheckAfter

This now shows the correct status 0 and when the EC” instance was started at 12:05 you can see the status change to 1

image005