From a7a8d088da25dbb15670e707e6b08dc6bac3cc80 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 9 Jul 2016 13:23:01 +0200 Subject: [PATCH] Ignore partitions on NVME devices by default The convention of the linux driver is nvme($device)n($namespace)p($partition). On *bsd it seems to be different, using "ns" instead of "n" as the namespace separator. --- collector/diskstats_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/diskstats_linux.go b/collector/diskstats_linux.go index 352ad7d8..e7b24fda 100644 --- a/collector/diskstats_linux.go +++ b/collector/diskstats_linux.go @@ -35,7 +35,7 @@ const ( ) var ( - ignoredDevices = flag.String("collector.diskstats.ignored-devices", "^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$", "Regexp of devices to ignore for diskstats.") + ignoredDevices = flag.String("collector.diskstats.ignored-devices", "^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$", "Regexp of devices to ignore for diskstats.") ) type diskstatsCollector struct {