David-VTUK / prometheus-rancher-exporter

MIT License
7 stars 7 forks source link

Reset `GaugeVec`'s on each iteration #7

Closed David-VTUK closed 2 years ago

David-VTUK commented 2 years ago

After deleting a cluster (in this case demo-cluster the metric remains:

# HELP cluster_connected identify if a downstream cluster is connected to Rancher
# TYPE cluster_connected gauge
cluster_connected{Name="demo-cluster"} 1
cluster_connected{Name="tools-cluster"} 1

Need to iterate through all the GaugeVec metrics and ensure they're reset before each iteration.