Skip to content

Commit

Permalink
register version collector outside homes loop
Browse files Browse the repository at this point in the history
  • Loading branch information
terjesannum committed Jan 29, 2024
1 parent eeb71c4 commit c94c867
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/tibber-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: tibber-exporter
version: 3.6.3
version: 3.6.4
description: Tibber exporter
type: application
keywords:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func main() {
log.Printf("Overiding websocket url with: %s\n", liveUrl)
wsUrl = liveUrl
}
prometheus.MustRegister(version.NewCollector("tibber_exporter"))
var started []string
for _, s := range homesQuery.Viewer.Homes {
s := s
Expand Down Expand Up @@ -140,7 +141,6 @@ func main() {
s.MeteringPointData.PriceAreaCode,
).Set(1)

prometheus.MustRegister(version.NewCollector("tibber_exporter"))
prometheus.MustRegister(metrics.NewHomeCollector(h))
log.Printf("Realtime consumption enabled for %v: %v\n", s.Id, s.Features.RealTimeConsumptionEnabled)
if (s.Features.RealTimeConsumptionEnabled || slices.Contains(liveMeasurements, string(s.Id))) && !slices.Contains(disableLiveMeasurements, string(s.Id)) {
Expand Down

0 comments on commit c94c867

Please sign in to comment.