From d7e89e769d60390f843913cb442cf868baeef34f 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 735e2154..ca29ff69 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 {