Skip zfs iostats (#2451)

skip over the zfs IO metrics if their paths are missing

Signed-off-by: tnextday <fw2k4@163.com>

Signed-off-by: tnextday <fw2k4@163.com>
This commit is contained in:
tnextday 2022-09-23 01:32:31 +08:00 committed by GitHub
parent 863f3ac54c
commit d7e89e769d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,10 +74,6 @@ func (c *zfsCollector) updatePoolStats(ch chan<- prometheus.Metric) error {
return err return err
} }
if zpoolPaths == nil {
return nil
}
for _, zpoolPath := range zpoolPaths { for _, zpoolPath := range zpoolPaths {
file, err := os.Open(zpoolPath) file, err := os.Open(zpoolPath)
if err != nil { if err != nil {