From cdc5c0325cd6d0e7c855d800ec87af0d18e21aa9 Mon Sep 17 00:00:00 2001 From: tnextday Date: Fri, 23 Sep 2022 01:32:31 +0800 Subject: [PATCH] Skip zfs iostats (#2451) skip over the zfs IO metrics if their paths are missing Signed-off-by: tnextday Signed-off-by: tnextday --- collector/zfs_linux.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/collector/zfs_linux.go b/collector/zfs_linux.go index 735e2154c9..ca29ff69d8 100644 --- a/collector/zfs_linux.go +++ b/collector/zfs_linux.go @@ -74,10 +74,6 @@ func (c *zfsCollector) updatePoolStats(ch chan<- prometheus.Metric) error { return err } - if zpoolPaths == nil { - return nil - } - for _, zpoolPath := range zpoolPaths { file, err := os.Open(zpoolPath) if err != nil {