From 9420fa93501b900e0b49608c86ca89d941b579b8 Mon Sep 17 00:00:00 2001 From: Victor1319 <834863182@qq.com> Date: Wed, 19 Jan 2022 15:20:10 +0800 Subject: [PATCH] enhance: add vol label for 'cfs_metanode_mpInodeCount' metricw Signed-off-by: Victor1319 <834863182@qq.com> --- metanode/metrics.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metanode/metrics.go b/metanode/metrics.go index 60d1273169..f89a092856 100644 --- a/metanode/metrics.go +++ b/metanode/metrics.go @@ -41,8 +41,10 @@ func (m *MetaNode) startStat() { func (m *MetaNode) upatePartitionMetrics(mp *metaPartition) { labels := map[string]string{ - "partid": fmt.Sprintf("%d", mp.config.PartitionId), + "partid": fmt.Sprintf("%d", mp.config.PartitionId), + exporter.Vol: mp.config.VolName, } + it := mp.GetInodeTree() if it != nil { exporter.NewGauge("mpInodeCount").SetWithLabels(float64(it.Len()), labels)