Skip to content

Commit 50127b0

Browse files
committed
changed labelname after code review
1 parent 4c40b7e commit 50127b0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/systemstatsmonitor/disk_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func NewDiskCollectorOrDie(diskConfig *ssmtypes.DiskStatsConfig) *diskCollector
145145
"Disk bytes used, in Bytes",
146146
"Byte",
147147
metrics.LastValue,
148-
[]string{deviceNameLabel, fstypeLabel, mountOptionLabel, stateLabel})
148+
[]string{deviceNameLabel, fsTypeLabel, mountOptionLabel, stateLabel})
149149
if err != nil {
150150
glog.Fatalf("Error initializing metric for %q: %v", metrics.DiskBytesUsedID, err)
151151
}
@@ -278,8 +278,8 @@ func (dc *diskCollector) collect() {
278278
deviceName := strings.TrimPrefix(partition.Device, "/dev/")
279279
fstype := partition.Fstype
280280
opttypes := partition.Opts
281-
dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fstypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "free"}, int64(usageStat.Free))
282-
dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fstypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "used"}, int64(usageStat.Used))
281+
dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fsTypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "free"}, int64(usageStat.Free))
282+
dc.mBytesUsed.Record(map[string]string{deviceNameLabel: deviceName, fsTypeLabel: fstype, mountOptionLabel: opttypes, stateLabel: "used"}, int64(usageStat.Used))
283283
}
284284

285285
}

pkg/systemstatsmonitor/labels.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const directionLabel = "direction"
2525
// stateLabel labels the state of disk/memory/cpu usage, e.g.: "free", "used".
2626
const stateLabel = "state"
2727

28-
// fstypeLabel labels the fst type of the disk, e.g.: "ext4", "ext2", "vfat"
29-
const fstypeLabel = "fstype"
28+
// fsTypeLabel labels the fst type of the disk, e.g.: "ext4", "ext2", "vfat"
29+
const fsTypeLabel = "fstype"
3030

3131
// mountPointLabel labels the mountpoint of the monitored disk device
32-
const mountOptionLabel = "mountoption"
32+
const mountOptionLabel = "mountoption"

0 commit comments

Comments
 (0)