mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
commit
1f523a7527
1 changed files with 37 additions and 34 deletions
|
@ -1,13 +1,16 @@
|
|||
#!/usr/bin/python
|
||||
# based on https://github.com/pdbrown/munin-custom/blob/master/plugins/hashrate
|
||||
# improved by @deveth0 (donation to 1GzHgp9hsDRsf96MnVk2oo6EG1VmWP9jGs :) )
|
||||
# usage: link to slush_reward_YOURAPIKEY
|
||||
# usage: set your api key in node-config, eg
|
||||
# [slush_*]
|
||||
# env.apikey foobar
|
||||
import sys
|
||||
import urllib2
|
||||
import json
|
||||
import os
|
||||
|
||||
SLUSH_URL = 'https://mining.bitcoin.cz/accounts/profile/json/'
|
||||
API_KEY = sys.argv[0][(sys.argv[0].rfind('_')+1):]
|
||||
API_KEY = os.getenv('apikey')
|
||||
SLUSH_STATS = SLUSH_URL + API_KEY
|
||||
|
||||
mining_stats_raw = urllib2.urlopen(SLUSH_STATS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue