properly strip path.rootfs from mountpoint labels (#1421)

Change-type: patch
Connects-to: #1418
Signed-off-by: dt-rush <nickp@balena.io>
This commit is contained in:
dt-rush 2019-07-19 14:51:17 +00:00 committed by Ben Kochie
commit 5d3e2ce2ef
7 changed files with 44 additions and 3 deletions

View file

@ -69,7 +69,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
stats = append(stats, filesystemStats{
labels: filesystemLabels{
device: device,
mountPoint: mountpoint,
mountPoint: rootfsStripPrefix(mountpoint),
fsType: fstype,
},
size: float64(mnt[i].f_blocks) * float64(mnt[i].f_bsize),