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?

4
  • 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? Commented Jul 10, 2021 at 13:38
  • In (2) the script I think. After I tried another script written in shell (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? github.com/AndOr0812/zabbix-antminer Commented Jul 12, 2021 at 14:54
  • The next step is trying to call the ./antminer-zbx-chk <host> <port> <username> <password> <item> from the console and look at the response. Commented Jul 12, 2021 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" Commented Jul 13, 2021 at 14:53

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

When it is echo 0 then it echo everything as zero. When it is echo 1, then every parametrers will be 1.
After I tried another script written in shell (github.com/dima666d/antminerS9i), it works. However, the python based script is not working.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.