Hi all,
This will be an extensive post with follow-ups how you can monitor your mining rigs with Zabbix.
1] If you are familiar with Zabbix, use the template in this post with the notes attached (location of the logfiles)
2] If you are not familiar with Zabbix, the follow-ups will describe howto make a Zabbix server with a Raspberry PI 3 V2, which costs about $35.
3] In a seperate post I'll describe howto use the triggers to actually reboot your miner (with an action), ie. reboot when there's no hash rate output or the hashrate falls below a certain treshold.
I am more then welcome to answer any questions and help ppl out if they have different mining tools; my examples use Awesome miner, but *any* logs can be used if they supply the values.
I am NOT going to link a ready-to-go Raspberry ISO; I've been thinking of doing this but you cannot trust this in your LAN. Instead I will show you step by step, even if you do not know Linux, how to make your Zabbix server.
https://i.imgur.com/5KIvGry.png^This image shows you Zabbix in action; the mining rig didn't output any values for 2 minutes so the agent rebooted it. Explanations will follow.
What the agent basically does is parse the logs from Awesome miner. I've set a commandline in Awesome Miner to log to the zabbix folder, since it's the most easies way this way.
-logfile "c:\program files\zabbix\miner.log"
https://i.imgur.com/4tMRIZl.pngTo install the Zabbix agent on your machine:
https://www.zabbix.com/download_agentsI use a W10 machine, firewall set to accept inbound and outbound 10050 and 10051 TCP.
Windows Config : zabbix_agentd.win.conf :
# This is a config file for the Zabbix agent daemon (Windows)
# To get more information about Zabbix, go to http://www.zabbix.com
LogFile=c:\program files\zabbix\zabbix_agentd.log
# EnableRemoteCommands=0
Server=<yourzabbixserverIP>
ListenPort=10050
ServerActive=<yourzabbixserverIP>
Linux Config : /etc/zabbix/zabbix-agentd.conf
https://www.zabbix.com/documentation/3.4/manual/concepts/agentYou can use Zypper (SLES) or apt-get (Debian and others) to install your agent.
Edit the conf file and make sure you have :
PidFile=/var/run/zabbix/zabbix-agentd.pid
Logfile=/var/log/zabbix/zabbix-agentd.log
EnableRemoteCommands = 1
Server=<yourzabbixserverIP>
ServerActive=<yourzabbixserverIP>
When you use Linux OS to mine, make sure you edit the Zabbix template (below) to reflect the correct location of the Mining Software output.
Awesome miner output loos like this :
23:25:29:951 1a3c ETH: GPU0 29.448 Mh/s, GPU1 29.443 Mh/s, GPU2 30.167 Mh/s
23:25:31:849 f18 srv_thr cnt: 1, IP: 127.0.0.1
23:25:31:866 f18 recv: 51
23:25:31:877 f18 srv pck: 50
23:25:31:890 f18 srv bs: 0
23:25:31:902 f18 sent: 244
23:25:33:192 414 GPU 0 temp = 40, old fan speed = 58, new fan speed = 30
23:25:33:266 414 GPU 1 temp = 42, old fan speed = 58, new fan speed = 30
23:25:33:332 414 GPU 2 temp = 46, old fan speed = 63, new fan speed = 30
Zabbix will parse this into correct values, using Regex.
If you already have Zabbix or know how to make one, here is your Awesome miner Template to monitor the values. Remember to either alter the template's logfile location or use the commandline described above.
(This is for Zabbix 3.4)