Open xarou opened 7 years ago
Thanks for reporting and triaging this! This was recently transferred to the community and I have not had the time to really had the time to look through the code in depth. After #7 merges and releases would you be willing to put together a PR for this?
I've manage to fix this issue modifying the parameters of the line method on line 6 of zpool.rb replaceing '' with "\n".
It might be intresting to check the operating system to ensure the right line separator is used.
Output without the fix ( with 2 zpools data and data_2) $-> /opt/sensu/embedded/bin/ruby /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems//sensu-plugins-zfs-1.2.3/bin/check-zpool.rb -s 31 -c 90 -C 90 sh: 2: data_2: not found sh: 2: data_2: not found sh: 2: data_2: not found CheckZPool CRITICAL: zpool data data_2 has state pool: data state: ONLINE ...