0

I'm trying the external script here https://github.com/AndOr0812/zabbix-antminer And after I configured the scripts and proxy settings, I was keeping getting zero data, both in Zabbix and the commandline. I have done chmod 755 and disabled firewall. It shows "[107] Transport endpoint is not connected". Any ideas on what to check/debugg?

Jin
  • 1
  • Zabbix server -> (1) -> Zabbix proxy -> (2) -> external script -> (3) -> antminer Do you know in which step the problem occurs? Can you isolate that step? Do you have something else that is working over the connection? – Walter A Jul 10 '21 at 13:38
  • In (2) the script I think. After I tried another script written in shell (https://github.com/dima666d/antminerS9i), it works. However, the python based script is not working. I'm asking if there are additional configurations needed for the python script above? https://github.com/AndOr0812/zabbix-antminer – Jin Jul 12 '21 at 14:54
  • The next step is trying to call the `./antminer-zbx-chk ` from the console and look at the response. – Walter A Jul 12 '21 at 16:17
  • I tried this step and ends up with getting a 0 of the item value. On the Zabbix terminal, all items were loaded successfully but getting 0s too. When I let the code to print out the error message, it says "[107] Transport endpoint is not connected" – Jin Jul 13 '21 at 14:53

1 Answers1

0

Make sure antminer-zbx-chk is responsible for your problems:
When the script is replaced by echo 0, is the error message gone?

Look on internet for your error message, this seems to be a timeout value. On https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/8466-many-time_wait-connection/page2 in issue with getpeername is mentioned. Maybe look into that.

Look how long the external script takes:

time ./antminer-zbx-chk  <host> <port> <username> <password> <item>

When it takes more then 10 seconds you must look for an async solution. When it takes 1-10 you can consider an async solution.

Async: One job that fires the antminer in the background and returns before a result is given. Another job that takes a look at the result or even betterL Make a script calling antminer and use zabbix_sender when a result is found.

Walter A
  • 19,067
  • 2
  • 23
  • 43
  • When it is echo 0 then it echo everything as zero. When it is echo 1, then every parametrers will be 1. – Jin Jul 14 '21 at 14:51
  • After I tried another script written in shell (github.com/dima666d/antminerS9i), it works. However, the python based script is not working. – Jin Jul 14 '21 at 14:52
  • So the question what to debug/test is solved: the python script. The zabbix-antminer is for python 3 and zabbix 3, perhaps the code is not compatible with your environment. Look for timeout values, dns, getpeername, try calling a script that calls antminer with nohup or try to contact the author of the script. – Walter A Jul 14 '21 at 22:04