A monitoring tool to collect all important metrics from your Chia farming node and connected harvesters. It can send you push notifications with regular status updates and will alert you in case something goes wrong or a proof is found. 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.
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.
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 XCH
๐ฐ๏ธ Time To Win: 2 weeks and 4 days
๐พ Current Netspace: 30.706 EiB
๐๏ธ Peak Height: 544594
๐ถ Full Node Peer Count: 8
๐ Synced: True
** ๐ค 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 Chia Network
** โ
Farmer Synced! โ
**
Your farmer is successfully synced to the Chia 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
The following statistics are collected from your local Chia node using the RPC and WebSocket APIs and are then exported via a Prometheus compatible /metrics
HTTP endpoint on port 8000
.
- Total balance (
chia_confirmed_total_mojos
)
- Sync status (
chia_sync_status
) - Peak height (
chia_peak_height
) - Difficulty (
chia_diffculty
) - Total netspace (
chia_network_space
) - Connection count (
chia_connections_count
)
- OG Plot count (
chia_plot_count
) - OG Plot size (
chia_plot_size
) - Portable Plot count (
chia_portable_plot_count
) - Portable Plot size (
chia_portable_plot_size
)
- Received signage points (
chia_signage_points
) - Received signage point index (
chia_signage_point_index
) - Attempted challenges (
chia_block_challenges
) - Plots passed filter (
chia_plots_passed_filter
) - Proofs found (
chia_proofs_found
)
To run this tool, we need the following things:
- Python 3
- Pipenv
sudo apt install python3 pipenv
- Clone the repository
git clone https://github.com/philippnormann/chia-monitor.git
cd chia-monitor
- Install the required dependecies
pipenv install
- Initialize the SQLite database
pipenv run alembic upgrade head
- Copy the example config file
cp config-example.json config.json
- Open up
config.json
and configure it to your preferences.
- Pull the latest release from git
cd chia-monitor
git reset origin/main --hard
git pull
- Update the required dependecies
pipenv install
- Upgrade the SQLite database model
pipenv run alembic upgrade head
To use the tool, run the monitor
module using pipenv
from the chia-monitor
directory
cd chia-monitor
pipenv run 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: chia_monitor
static_configs:
- targets: ['<<CHIA-MONITOR-HOSTNAME>>:8000']
and adjust the host name accordingly.