Skip to content

Commit

Permalink
changed labelname after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
vteratipally committed Aug 6, 2020
1 parent 4c40b7e commit 50127b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/systemstatsmonitor/disk_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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))
}

}
Expand Down
6 changes: 3 additions & 3 deletions pkg/systemstatsmonitor/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 50127b0

Please sign in to comment.