A monitoring tool to collect all important metrics from your Gold farming node and connected harvesters.
These metrics are collected from the Gold daemon via RPC and WebSocket interfaces and can also be used to send you push notifications with regular status updates, alert you if something goes wrong, a proof is found, or you receive payments to your farmer wallet.
All metrics are exported to a Prometheus compatible /metrics
endpoint and a Grafana dashboard is also provided:
This example dashboard displays almost all collected metrics and can be imported from grafana.com using the ID 14544
or using the grafana/dashboard.json
from this repository.
If you find this tool helpful and want to support the development, feel free to give this repo a โญ or donate some Gold (GL) to my address: gl1w9clzakz3rmyw7d2q7j233uy8afp8ymeqmpjs5wa8s5j3a4cla5sycrlmq
To use notifications, please configure a status_service_url
and alert_service_url
for your desired notification service in the config.json
. You can use most popular notifications services by creating a service specific webhook URL, following the instructions from this wiki. If you wish to disable notifications entirely, you can set the enable
flag in the notifications
section of the config.json
to false
.
Following notifications are currently sent to the status_service_url
:
** ๐จโ๐พ Farm Status ๐ฉโ๐พ **
๐พ OG Plot Count: 3797
๐พ Portable Plot Count: 50
๐งบ OG Plot Size: 375.828 TiB
๐งบ Portable Plot Size: 4.948 TiB
๐ Plot Change 24h: +86 (+8.511 TiB)
โ๏ธ Signage Points Per Minute: 6.30
๐ Passed Filters Per Minute: 49.30
โ
Total Proofs found: 73
๐ฐ Total Balance: 2.00001 GL
๐ฐ๏ธ Time To Win: 2 weeks and 4 days
๐พ Current Netspace: 30.706 EiB
๐๏ธ Peak Height: 544594
๐งฎ Mempool Size: 15
๐ถ Full Node Peer Count: 8
๐ Synced: True
Triggers when a new partial or full proof is found. To limit the amount of notifications when pooling, this can be disabled in the config using the disable_proof_found_alert
setting.
** ๐ค Proof found! ๐ค **
Your farm found a new partial or full proof
Following notifications are currently sent to the alert_service_url
:
** ๐จ Farmer Lost Sync! ๐จ **
It seems like your farmer lost its connection to the Gold Network
** โ
Farmer Synced! โ
**
Your farmer is successfully synced to the Gold Network again
Triggers when the total plot count of your farm drops below a configurable threshold (default: 1).
The corresponding lost_plots_alert_threshold
parameter can be adjusted in the config.json
.
** ๐จ Farmer Lost Plots! ๐จ **
It seems like your farmer lost some plots
Expected: 130, Found: 124
** โ
Farmer Plots recoverd! โ
**
Your farmer's plot count has recovered to its previous value
** ๐ค Payment received! ๐ค **
Your wallet received a new payment
๐ฑ +0.10240 GL
The following statistics are collected from your local Gold node using the RPC and WebSocket APIs and are then exported via a Prometheus compatible /metrics
HTTP endpoint on the exporter_port
from your config.json
.
- Total balance (
gold_confirmed_total_mojos
) - Total farmed (
gold_farmed_total_mojos
)
- Sync status (
gold_sync_status
) - Peak height (
gold_peak_height
) - Mempool size (
gold_mempool_size
) - Difficulty (
gold_diffculty
) - Total netspace (
gold_network_space
) - Connection count (
gold_connections_count
)
- OG plot count (
gold_plot_count
) - OG plot size (
gold_plot_size
) - Portable plot count (
gold_portable_plot_count
) - Portable plot size (
gold_portable_plot_size
)
- Received signage points (
gold_signage_points
) - Received signage point index (
gold_signage_point_index
) - Attempted challenges (
gold_block_challenges
) - Plots passed filter (
gold_plots_passed_filter
) - Proofs found (
gold_proofs_found
) - Lookup time (
gold_lookup_time_seconds
)
- Current Points (
gold_current_pool_points
) - Current difficulty (
gold_current_pool_difficulty
) - Points found (
gold_pool_points_found_since_start
) - Points acknowledged (
gold_pool_points_acknowledged_since_start
) - Points found 24h (
gold_pool_points_found_24h
) - Points acknowledged 24h (
gold_pool_points_acknowledged_24h
) - Pool errors 24h (
gold_num_pool_errors_24h
)
All pooling metrics support the following labels:
- P2 singleton address (
p2
) - Pool URL (
url
)
- USD price (
gold_price_usd_cent
) - EUR price (
gold_price_eur_cent
) - BTC price (
gold_price_btc_satoshi
) - ETH price (
gold_price_eth_gwei
)
To run this tool, we need the following things:
- Python 3
- Pipenv
sudo apt install python3
- Clone the repository
git clone https://github.com/Meeea-914/gold-monitor.git
cd gold-monitor
- Create and activate venv
python -m venv venv
source ./venv/bin/activate
- Install the required dependecies
pip install -r requirements.txt
- Initialize the SQLite database
bash
python -m alembic upgrade head
5. Copy the example config file
```bash
cp config-example.json config.json
- Open up
config.json
and configure it to your preferences.
- Pull the latest release from git
cd gold-monitor
git reset origin/main --hard
git pull
- Update the required dependecies
source ./venv/bin/activate
pip install -r requirements.txt
- Upgrade the SQLite database model
python -m alembic upgrade head
- Import (Overwrite) the Grafana dashboard using the
grafana/dashboard.json
To use the tool, run the monitor
module using pipenv
from the gold-monitor
directory
cd gold-monitor
source ./venv/bin/activate
python -m monitor
Note: To run the tool in the background, you can run it as a service or in a detached screen.
Add a block to the scrape_configs
of your prometheus.yml
config file:
scrape_configs:
- job_name: gold_monitor
static_configs:
- targets: ['<<GOLD-MONITOR-HOSTNAME>>:14800']
and adjust the host name accordingly.