Fix zfs pool monitoring when a pool has errors

We must drop stderr so messages like permissions error getting errors do
not pollute the JSON output
This commit is contained in:
Daniel Berteaud 2021-02-17 10:30:59 +01:00
parent 0a6c9cdd62
commit c1f20d9388

View File

@ -100,7 +100,7 @@ sub get_zpool_errors {
}; };
my $i = 0; my $i = 0;
my $index = {}; my $index = {};
foreach my $line (qx($zpool status $pool)){ foreach my $line (qx($zpool status $pool 2>/dev/null)){
# Output looks like # Output looks like
# pool: rpool # pool: rpool
# state: ONLINE # state: ONLINE