vespa-engine / vespa_exporter

Vespa metrics exporter for Prometheus
Apache License 2.0
6 stars 5 forks source link

Set status code to zero when a service is unreachable #6

Closed dkurzaj closed 6 years ago

dkurzaj commented 6 years ago

When a service is unreachable we need to set its status_code metric to zero.

Until now, when we started the exporter and a service was already down, the metric did just not appear and we might not notice that it was down at startup.

And when a service got down while the exporter was already running, the "status" metric would keep its last value (like all the metrics in this situation), but if there is one metric that we should update when we can not contact the service, it's this one.

Now we can determine when a service was down and consider all the metrics prompted during that period as just the last known value before the interruption. Before that, the only way to know a service was down was to not see the metrics varying anymore.