Skip to content

Commit

Permalink
enhance: add vol label for 'cfs_metanode_mpInodeCount' metricw
Browse files Browse the repository at this point in the history
Signed-off-by: Victor1319 <[email protected]>
  • Loading branch information
Victor1319 authored and leonrayang committed Jul 14, 2022
1 parent 406b8e2 commit 9420fa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metanode/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9420fa9

Please sign in to comment.