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
1 changed files with 1 additions and 1 deletions

View File

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