changed labelname after code review

This commit is contained in:
varsha teratipally
2020-08-06 00:43:45 +00:00
parent 4c40b7e468
commit 50127b0512
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -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))
}
}
+3 -3
View File
@@ -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"
const mountOptionLabel = "mountoption"