diff --git a/plugins/ethereum/ethermine_ b/plugins/ethereum/ethermine_hashrate_ similarity index 84% rename from plugins/ethereum/ethermine_ rename to plugins/ethereum/ethermine_hashrate_ index 5a58129a..9dc068e9 100755 --- a/plugins/ethereum/ethermine_ +++ b/plugins/ethereum/ethermine_hashrate_ @@ -1,7 +1,7 @@ #!/usr/bin/env python # -# ethermine_ +# ethermine_hashrate_ # # Munin plugin to monitor your ethermine.org hashrate. # @@ -9,10 +9,10 @@ # Licence: GPLv2 # # USAGE -# ethermine__ +# ethermine_hashrate__ # # EXAMPLE -# ln -s /usr/share/munin/plugins/ethermine_ /etc/munin/plugins/ethermine_3257bde8cf067ae6f1ddc0e4b140fe02e3c5e44f_mine +# ln -s /usr/share/munin/plugins/ethermine_hashrate_ /etc/munin/plugins/ethermine_hashrate_3257bde8cf067ae6f1ddc0e4b140fe02e3c5e44f_mine # from __future__ import print_function @@ -31,7 +31,7 @@ try: eth_address, miner = sys.argv[0].split("_")[1:] except ValueError: print("The filename of this plugin (or its symlink) should follow this pattern: " - "'_'", file=sys.stderr) + "'ethermine_hashrate__'", file=sys.stderr) sys.exit(9) if command == 'config': diff --git a/plugins/ethereum/etherscan_balance_ b/plugins/ethereum/etherscan_balance_ index 3a63211b..b3fe0f5c 100755 --- a/plugins/ethereum/etherscan_balance_ +++ b/plugins/ethereum/etherscan_balance_ @@ -29,14 +29,14 @@ if len(sys.argv) > 1: command = sys.argv[1] try: - eth_address = sys.argv[0].split("_")[1:] + eth_address = sys.argv[0][(sys.argv[0].rfind('_')+1):] except ValueError: print("The filename of this plugin (or its symlink) should follow this pattern: " - "''", file=sys.stderr) + "'etherscan_balance_'", file=sys.stderr) sys.exit(9) if command == 'config': - print("graph_title eth {}".format(eth_address)) + print("graph_title ETH {}".format(eth_address)) print("graph_title Ethereum Address {}".format(eth_address)) print("graph_info Ethereum Account Balance for Address {}".format(eth_address)) print("graph_title Ethereum Balance") @@ -47,6 +47,7 @@ if command == 'config': ethercan_balance_api_url = 'https://api.etherscan.io/api?module=account&action=balance&tag=latest&address=' + eth_address etherscan_req = urllib2.Request(ethercan_balance_api_url) +# User-Agent etherscan_req.add_header('User-Agent', 'Mozilla/5.0') try: