The shell scripted (1.2) version of rig-monitor is no longer supported nor maintained.

Version 2.0 – written in Golang has been released and includes many improvements. Installation instructions for version 1.2 are still available here and blog post about the re-write decision here.

The latest version (1.2) of rig-monitor adds the following features:

  • Support for claymore single and dual mining mode
  • Integration with ethermine pool (currentStats, payouts) API
  • Integration with MPOS-based pools (e.g. miningpoolhib) pool (getdashboarddata) API
  • Integration with nanopool API (generalinfo, payments). Supports all crypto pools (ETH, ETC, SIA, PASC, XMR and ZEC)
  • Integration with coinmarketcap API for monitoring crypo prices in different quote currencies, trading volume and market cap. Supports conversion to different quote currencies.
  • Revised template dashboards

Here are the installation steps.


Mining rigs

  • Rigs running Claymore’s miner (tested with 9.6+ versions). Both Windows and Linux are supported.
  • Remote manangment port enabled. This option is enabled (READONLY) and running on port 3333 by default.

Management server

  • linux server (I am using a rasbperry pi version B with 512Mb RAM and a 4Gb SD). If you want to manage 10+ rigs with a data retention longer than 1-2 days then I suggest to user a more power raspberry pi or server)
  • msysql
  • grafana-server 4.3.x or 4.4.x (for raspberry pi linux get it here or here for x86 distros)
  • rig-monitor (my scripts. See below)


  • TP Link HS110 smart plugs (optional) installed and configured.
  • admin access to the internet gateway of your rig farm (this is needed to access the raspberry pi remotely via SSH)


Update and upgrade installed packages

sudo apt-get update
sudo apt-get upgrade

Install dependencies

sudo apt-get install mysql-server
sudo apt-get install w3m
sudo apt-get install jq

Don’t forget to write down mysql’s root password

Download and install grafana server

The link below is for raspberry pi v1 (version 4.3.2), for other versions download it from here or here for x86 distros).

sudo dpkg -i grafana_4.3.2_armhf.deb
sudo apt-get install -f

Configure grafana server

Edit /etc/grafana/grafana.ini with your favorite editor.

There are lots of options there, but you should, at least enable the ones bellow:

Under the [paths] section uncomment the following lines

data = /var/lib/grafana
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins

Under the [server] section uncomment the following lines

protocol = http
http_port = 3000

Under the [database] section uncomment the following lines. Grafana needs to store it’s metadata in a database. It comes with sqlite, which I am going to use. Alternatively you could configure it to use mysql if you wish.

type = sqlite3

Under the [security] section uncomment the following lines

admin_user = admin
admin_password = admin

Under the [auth.basic] section uncomment the following lines

enabled = true

Start grafana-server

sudo service grafana-server start

Check if server is running

sudo service grafana-server status

Check if grafana UI is running properly. Open web browser and enter grafana web server URL: http://<management server IP>:3000

Enable startup on boot

sudo update-rc.d grafana-server defaults

In case the service doesn’t start automatically after boot you can fix it by running

sudo systemctl enable grafana-server.service

Download and install rig-monitor

Download the zip or clone the repo from here.

The package includes the following scripts:

  • – Read rig info from config file (./conf/rig-monitor.conf) and push it to DB. This will run from crontab once a day, but it can also be run manually to update rig changes.
  • – Read rig and gpu status info from claymore via remote management port. If smart plugs option is enabled and configured it will also collect power rig power consumption. This scrip will run from crontab every minute.
  • – Read from all pool/wallet combinations defined in config file. This will run from crontab every 10 mins as most pools only update the API data every 10 mins as well.
  • – Read from all base/quote cunrrency combinations from This script will run from crontab every 5 mins
  • – Clean up old data from DB and backup old logs to data_bkup dir


The following options can be configured by editing the config file (./conf/rig-monitor.conf)

Mysql user account and password which will be used to ingest and read rig, gpu info and data.


Date format used in data file name. DDMMYYYY (default) or MMDDYYYY


Smart plugs configured (default). This is required if power usage monitoring is required (and TPLINK HS110 plugs are configured.


Data retention period in days (default=7). If you want to manage 10+ rigs with a data retention longer than 2-3 days then I suggest to user a more power raspberry pi or server.


Read config file (./conf/rig-monitor.conf) and update rig info interval (in minutes). Default is 1 day


List of rigs. Add the details of the rigs to be monitored. Fields (in order):

  • RIG IP

List of pools/wallets. Add the details of the pools/wallets to be monitored. Fields (in order):

  • POOL_TYPE – pool backend backend e.g. ethermine, mpos, etc..
  • CURRENCY – only used for nanopool L E.G.
  • LABEL – to differentiate between pools using same backend e.g. MPOS API_URL -URL for pool API e.g.
  • API_TOKEN – required for pools that need API token to pull stats e.g. miningpoolhub
  • WALLET_ADDRESS – some MPOS pools use the API token instead of the wallet address to uniquely identify miners

List of currency pairs. Fields (in order)

Currency pairs: base currency/quote currency

Valid valued for quote currency are: “AUD”, “BRL”, “CAD”, “CHF”, “CLP”, “CNY”, “CZK”, “DKK”, “EUR”, “GBP”, “HKD”, “HUF”, “IDR”, “ILS”, “INR”, “JPY”, “KRW”, “MXN”, “MYR”, “NOK”, “NZD”, “PHP”, “PKR”, “PLN”, “RUB”, “SEK”, “SGD”, “THB”, “TRY”, “TWD”, “USD”,”ZAR”


Create DB and rig-monitor metadata

The command below with create the grafana user in mysql and required DB tables. If you have changed the GRAFANA_DB_USER and GRAFANA_DB_PWD in the config file then you should edit <rig-monitor dir>/sql/create_db.sql accordingly

mysql -u root -p<mysql root password> < ./rig-monitor/sql/create_db.sql

If you have problems accessing mysql then simply try entering the password manually.

mysql -u root

If that fails then check the solution here

Populate the DB with the existing rig info by runnning


Configuring remote access to grafana (optional)

I needed to access the dashboards remotely, but I don’t want to make the grafana web server directly accessible via the internet; you know because of vulnerabilities. There are multiple ways to do this e.g. VPN, SSH tunnel, etc… I chose the SSH tunnel because of simplicity.

  • Make my raspberry pi accessible from the internet via SSH. You’ll have to configure your internet router to route traffic from whatever port you want to use to your router’s SSH port. I am using port 19000 so basically traffic router to my gateway public IP address (e.g. will be routed to my server SSH ip and port (e.g.
  • Use a Dynamic DNS service to keep my domain name and IP updated and accessible. I am using (they have a free tier), but you can chose another.
    • Register at
  • Create your DNS entry
  • Update the config file (<rig-monitor dir/conf/rig-monitor.conf) with the DYNU credentials and host name
# dynu username
# dynu username
# dynu hostname

Update crontab

Add following entries to crontab

35 * * * * <rig-monitor dir>/ > /dev/null
0 1 * * * <rig-monitor dir>/ > /dev/null
* * * * * <rig-monitor dir>/ > /dev/null
*/10 * * * * <rig-monitor dir>/ > /dev/null
*/10 * * * * <rig-monitor dir>/ > /dev/null
0 2 * * * <rig-monitor dir>/ > /dev/null

Configure grafana DB source

Now log on as admin to grafana via browser (http://<server ip>:3000). Go to Data Sources, click add and fill out the following fields:

Name: rigdatadb
Type: MySQL
Host: localhost:3306
Database: rigdata
User: grafana
Password: grafana

Click ‘Save & Test’. Everything should be working now.

Import dashboards

Import template dashbords via sqlite:

sudo sqlite3 /var/lib/grafana/grafana.db
sqlite> .separator ","
sqlite> .import dashboards.csv dashboard
sqlite> .quit

Set grafana alerts

Grafana supports multiple alert methods. Currently I am using telegram so forward alter notifications to my cell phone. This is how you do it

1. Install Telegram app on your cell phone
2. On your phone open this link. This will open a chat with Telegram’s Botfather
3. Create new bot using /newbot. Then name your bot and give it a username. The bot will reply with a token e.g. 3653462710:AAGgPlkjdflasd78dsf;SDFMAklsadfgDpHzl-AP
4. Create a telegram group and add your bot to it
5. Copy and past the following link to your browser:<TOKEN>/getUpdates. In my case that would be;SDFMAklsadfgDpHzl-AP/getUpdates

That command should produce an output like this

"message":{"message_id":2,"from":{"id":762837642,"is_bot":false,"first_name":"John","last_name":"Doe","language_code":"root"},"chat":{"id": 762837642,"first_name":"Rodrigo","last_name":"Fernandes","type":"private"},"date":1503863332,"text":"/help","entities":[{"offset":0,"length":5,"type":"bot_command"}]}}]}
 if the output is simply

then send a couple of messages in the group chat and try again.

6. Write down the id code above we will need it to confirm the notifications in Telegram
7. On Grafana’s main menu go to Alerting / Notifications Channel and click New Channel. Fill in a name, select Type as Telegram, check “Send on all alerts” and “Include image” checkboxes, fill in the BOT API token with the token from step 3 and fill in the “Chat ID” with the ID from step 5.

Access grafana dashboads via SSH tunnel

Open SSH client tunnel with following command

ssh -L 8080:<ip address of raspberry pi>:3000 pi@<dynu hostname> -p 19000

Now go to your browser and enter the following URL: localhost:8080
The grafana UI should come up.

Leave me a comment if you have any issues/questions.
Did you enjoy this post? Buy me a beer
ETH: 0x0f2d4397CecB53883411cfe75882622c312c8340
MUSICOIN: 0x9a44a57041acd5f1511bf13a663d136ddbde1fb1

Leave a Reply

Your email address will not be published. Required fields are marked *