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
tags/zabbix-agent-addons-0.2.148-1
Daniel Berteaud 4 years ago
parent 0a6c9cdd62
commit c1f20d9388
  1. 2
      zabbix_scripts/check_zfs

@ -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

Loading…
Cancel
Save