rodneymo / rig-monitor

monitoring solution for mining rigs
https://randomcryptostuff.blogspot.nl/2017/08/monitoring-ethereum-mining-farm-using.html
GNU General Public License v3.0
30 stars 12 forks source link

Hotfix/nanopool #40

Closed wishbone1138 closed 6 years ago

wishbone1138 commented 6 years ago

Two main fixes.

  1. You already had the worker data you needed from the general /user/ call. I commented out the separate user call for now and added the following additional fields to capture: rating - this is the number of shares contributed by that worker, not sure when/if it gets reset but I've been using it awhile for 10 min share rates and it's worked well for me hashrate - current reported hashrate of that worker *** I kept the 24h hashrate in there, but I'm not a huge fan of capturing all these averages from the pool. If you have the hashrate you can calculate this pretty easily from grafana directly?

  2. I added the call to capture "confirmed" attribute in pool_payments because if you pull down payments regularly you can end up with two entries in the DB. I think the time changes once it goes into "Confirmed"? There might be another way to handle this, but it's easy to ignore things that are not confirmed and if someone wanted to see how long it was taking payments to reach their wallet you could potentially do that. Thoughts? The other option is not to pull down values until they're confirmed.