From 50127b0512599f7f6f16af7b6a798edc693dc299 Mon Sep 17 00:00:00 2001 From: varsha teratipally Date: Thu, 6 Aug 2020 00:43:45 +0000 Subject: [PATCH] changed labelname after code review --- pkg/systemstatsmonitor/disk_collector.go | 6 +++--- pkg/systemstatsmonitor/labels.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/systemstatsmonitor/disk_collector.go b/pkg/systemstatsmonitor/disk_collector.go index 7107baa6..3bab1528 100644 --- a/pkg/systemstatsmonitor/disk_collector.go +++ b/pkg/systemstatsmonitor/disk_collector.go @@ -145,7 +145,7 @@ func NewDiskCollectorOrDie(diskConfig *ssmtypes.DiskStatsConfig) *diskCollector "Disk bytes used, in Bytes", "Byte", metrics.LastValue, - []string{deviceNameLabel, fstypeLabel, mountOptionLabel, stateLabel}) + []string{deviceNameLabel, fsTypeLabel, mountOptionLabel, stateLabel}) if err != nil { glog.Fatalf("Error initializing metric for %q: %v", metrics.DiskBytesUsedID, err) } @@ -278,8 +278,8 @@ func (dc *diskCollector) collect() { deviceName := strings.TrimPrefix(partition.Device, "/dev/") fstype := partition.Fstype opttypes := partition.Opts - dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fstypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "free"}, int64(usageStat.Free)) - dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fstypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "used"}, int64(usageStat.Used)) + dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fsTypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "free"}, int64(usageStat.Free)) + dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fsTypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "used"}, int64(usageStat.Used)) } } diff --git a/pkg/systemstatsmonitor/labels.go b/pkg/systemstatsmonitor/labels.go index a75e39ee..e1133e60 100644 --- a/pkg/systemstatsmonitor/labels.go +++ b/pkg/systemstatsmonitor/labels.go @@ -25,8 +25,8 @@ const directionLabel = "direction" // stateLabel labels the state of disk/memory/cpu usage, e.g.: "free", "used". const stateLabel = "state" -// fstypeLabel labels the fst type of the disk, e.g.: "ext4", "ext2", "vfat" -const fstypeLabel = "fstype" +// fsTypeLabel labels the fst type of the disk, e.g.: "ext4", "ext2", "vfat" +const fsTypeLabel = "fstype" // mountPointLabel labels the mountpoint of the monitored disk device -const mountOptionLabel = "mountoption" \ No newline at end of file +const mountOptionLabel = "mountoption"