grafana / cloudcost-exporter

Prometheus Exporter for Cloud Provider agnostic cost metrics
Apache License 2.0
30 stars 1 forks source link

feat(gcp+aws): Add last_scrape_time metric #159

Closed Pokom closed 5 months ago

Pokom commented 5 months ago

In order to better track freshness of data, this PR adds a few more operational metrics:

The intent of these is to export in unix time the last time a scrape was performed. This can be used to alert in prometheus when the last_scrape_time was say > 60m.

This also implements in AWS the operational metrics that GCP implemented so that we have feature parity between the two. In the future it would make sense to generalize this to a common interface so that new providers do not need to implement the same metrics.

Pokom commented 5 months ago

I bundled into this change adding some operational metrics to AWS(akin to #105 but not completely implemented). I'm okay splitting the AWS changes off into a separate PR if we'd prefer to keep it as small as possible.