Open fraternl opened 3 years ago
Yes, i think that error message on Zabbix side should be helpful, but how to deliver it to Z?
UPD. I can just make little change in the manual: "Install necessary Perl modules ...liblwp-protocol-https-perl
"...
it's just when you're setting it up. I didn't even know there was an api and at that point i had no time yet to learn the syntax of the miner.
I write a lot of this stuff myself and would never expect that a fatal error like this would not throw an error. You can throw it out on the error output.
I just hoped to be a bit wiser when I enabled debug. It was a surprise for me that the error was fatal even though it returned syntactically correct data.
It would have been better if it just crashed :)
I'm very glad you made it, though.
cheers
It took me a while before I got it working and hopefully you will modify your code so others don't have the same problem. The reason why it didn't work out of the box for me is probably because I started with a fresh perl installation from source. On this server there's also other software and it has perl pre-installed. I installed a fresh perl in /usr/local/bin
I modified /usr/local/sbin/unifi_miner.pl so it has the credentials in the code and also modified the first line to
!/usr/local/bin/perl
I then executed _unifiminer.pl and I saw I needed to install some perl modules which I did with CPAN until I didn't get any errors. I then started unifi_miner.pl again and it just gave me this
unifi_miner.pl
It wasn't until I enabled DEBUG until I found what was going on.....
That was easy to fix, but it took a long time before I enabled debug.
Can you please change the code accordingly so this kind of error gets any feedback. The code could also test for LWP::Protocol::https