blind-oracle / zabbix-zfs

Zabbix template & script to monitor ZFS on Linux
Mozilla Public License 2.0
30 stars 6 forks source link

zfs.py has windows line endings #1

Closed Whytey closed 3 years ago

Whytey commented 3 years ago

Just installed this. It is working well but I needed to tweak the zfs.py script to make it work.

I downloaded the script from github using wget, which pulled the file as is. When Zabbix tried to do discovery, it threw an error that indicated we had a windows style line ending (carriage return + new line):

usr/bin/env: ‘python3\r’: No such file or directory

I fixed this by running the following Perl script...

perl -pe 's/\r$//g' zfs-storage-discovery.py zfs-storage-discovery.py.new

...then copying the new file over the original. Everything went swimmingly then.

Cheers!

blind-oracle commented 3 years ago

Strange, considering that I developed it on Mac if I remember... fixed, thanks!