Add reason field to faied_scale_ups_total metric

For now it's just a placeholder, will add proper logic
for next release
This commit is contained in:
Maciej Pytel 2017-09-25 16:33:49 +02:00
parent 9f7cdb8b56
commit 7f7243ea98
1 changed files with 4 additions and 3 deletions

View File

@ -129,12 +129,12 @@ var (
},
)
failedScaleUpCount = prometheus.NewCounter(
failedScaleUpCount = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: caNamespace,
Name: "failed_scale_ups_total",
Help: "Number of times scale-up operation has failed.",
},
}, []string{"reason"},
)
scaleDownCount = prometheus.NewCounterVec(
@ -232,7 +232,8 @@ func RegisterScaleUp(nodesCount int) {
// RegisterFailedScaleUp records a failed scale-up operation
func RegisterFailedScaleUp() {
failedScaleUpCount.Inc()
// TODO(maciekpytel): add real reasons
failedScaleUpCount.WithLabelValues("unknown").Inc()
}
// RegisterScaleDown records number of nodes removed by scale down