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 π©βπΎ **
πΎ Plot Count: 2217
π§Ί Plot Size: 219.451 TiB
βοΈ Signage Points Per Minute: 6.42
π Passed Filters Per Minute: 29.90
β
Proofs found: 1
π° Total Balance: 2.00001 XCH
π°οΈ Expected Time To Win: 3 weeks and 3 days
πΎ Current Netspace: 23.938 EiB
ποΈ Peak Height: 440778
πΆ Full Node Peer Count: 8
π Synced: True
Following notifications are currently sent to the alert_service_url
:
** π€ Proof found! π€ **
Your farm found a new proof
** π¨ 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
** π¨ 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
)
- Plot count (
chia_plot_count
) - Plot size (
chia_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 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.
Multiple remote harvesters can be monitored using this tool.
In order for this to work, you need to make sure the RPC endpoint of your harvester can be reached from the machine on which the farmer and chia-monitor are running on.
Unless you have a firewall setup on your harvester, all you need to do to achieve this, is to change the self_hostname
in your ~/.chia/mainnet/config/config.yaml
from localhost
to 0.0.0.0
:
self_hostname: 0.0.0.0
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.