Skip to content

Commit

Permalink
Label region on Dataproc metrics (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
7onn authored Apr 28, 2022
1 parent 7de6da4 commit 8b00774
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collector/dataproc_is_cluster_running.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

var (
isDataprocClusterRunning = prometheus.NewDesc("dataproc_is_cluster_running", "tells whether the Dataproc cluster is running", []string{"project", "zone", "name"}, nil)
isDataprocClusterRunning = prometheus.NewDesc("dataproc_is_cluster_running", "tells whether the Dataproc cluster is running", []string{"project", "region", "zone", "name"}, nil)
)

type DataprocIsClusterRunningCollector struct {
Expand Down Expand Up @@ -76,6 +76,7 @@ func (e *DataprocIsClusterRunningCollector) Update(ch chan<- prometheus.Metric)
prometheus.GaugeValue,
1.,
e.project,
region,
zone,
cluster.ClusterName)
} else {
Expand All @@ -84,6 +85,7 @@ func (e *DataprocIsClusterRunningCollector) Update(ch chan<- prometheus.Metric)
prometheus.GaugeValue,
0.,
e.project,
region,
zone,
cluster.ClusterName)
}
Expand Down

0 comments on commit 8b00774

Please sign in to comment.