@@ -70,7 +70,7 @@ started.
70
70
clusterOperatorConditions : prometheus .NewGaugeVec (prometheus.GaugeOpts {
71
71
Name : "cluster_operator_conditions" ,
72
72
Help : "Report the conditions for active cluster operators. 0 is False and 1 is True." ,
73
- }, []string {"name" , "condition" }),
73
+ }, []string {"name" , "condition" , "reason" }),
74
74
clusterOperatorConditionTransitions : prometheus .NewGaugeVec (prometheus.GaugeOpts {
75
75
Name : "cluster_operator_condition_transitions" ,
76
76
Help : "Reports the number of times that a condition on a cluster operator changes status" ,
@@ -122,7 +122,7 @@ func (m *operatorMetrics) Describe(ch chan<- *prometheus.Desc) {
122
122
ch <- m .version .WithLabelValues ("" , "" , "" ).Desc ()
123
123
ch <- m .availableUpdates .WithLabelValues ("" , "" ).Desc ()
124
124
ch <- m .clusterOperatorUp .WithLabelValues ("" , "" ).Desc ()
125
- ch <- m .clusterOperatorConditions .WithLabelValues ("" , "" ).Desc ()
125
+ ch <- m .clusterOperatorConditions .WithLabelValues ("" , "" , "" ).Desc ()
126
126
ch <- m .clusterOperatorConditionTransitions .WithLabelValues ("" , "" ).Desc ()
127
127
}
128
128
@@ -227,7 +227,7 @@ func (m *operatorMetrics) Collect(ch chan<- prometheus.Metric) {
227
227
if condition .Status == configv1 .ConditionUnknown {
228
228
continue
229
229
}
230
- g := m .clusterOperatorConditions .WithLabelValues (op .Name , string (condition .Type ))
230
+ g := m .clusterOperatorConditions .WithLabelValues (op .Name , string (condition .Type ), string ( condition . Reason ) )
231
231
if condition .Status == configv1 .ConditionTrue {
232
232
g .Set (1 )
233
233
} else {
0 commit comments