keep slow_requests metric name in nautilus instead of slow ops

This commit is contained in:
Sasha Krutiy 2020-01-06 15:59:41 -05:00
parent 73414aaa21
commit 102830acf5
2 changed files with 8 additions and 5 deletions

View File

@ -435,11 +435,14 @@ func NewClusterHealthCollector(conn Conn, cluster string) *ClusterHealthCollecto
ConstLabels: labels,
},
),
// with Nautilus, SLOW_OPS has replaced both REQUEST_SLOW and REQUEST_STUCK
// therefore slow_requests is deprecated, but for backwards compatibility
// the metric name will be kept the same for the time being
SlowOps: prometheus.NewGauge(
prometheus.GaugeOpts{
Namespace: cephNamespace,
Name: "slow_ops",
Help: "No. of slow ops",
Name: "slow_requests",
Help: "No. of slow requests/slow ops",
ConstLabels: labels,
},
),

View File

@ -425,7 +425,7 @@ $ sudo ceph -s
}
}`,
regexes: []*regexp.Regexp{
regexp.MustCompile(`slow_ops{cluster="ceph"} 3`),
regexp.MustCompile(`slow_requests{cluster="ceph"} 3`),
},
},
{
@ -443,7 +443,7 @@ $ sudo ceph -s
}
}`,
regexes: []*regexp.Regexp{
regexp.MustCompile(`slow_ops{cluster="ceph"} 3`),
regexp.MustCompile(`slow_requests{cluster="ceph"} 3`),
},
},
{
@ -461,7 +461,7 @@ $ sudo ceph -s
}
}`,
regexes: []*regexp.Regexp{
regexp.MustCompile(`slow_ops{cluster="ceph"} 18`),
regexp.MustCompile(`slow_requests{cluster="ceph"} 18`),
},
},
{