๐Ÿƒ A comprehensive monitoring and alerting solution for the status of your Chia farmer and harvesters.

Overview

chia-monitor discord

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:

grafana

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.

Notifications

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 field in the notifications section of the config.json to false.


Following notifications are currently sent to the status_service_url:

Farm summary (configurable interval in config.json)

** ๐Ÿ‘จโ€๐ŸŒพ 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 alert

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:

Sync lost alert

** ๐Ÿšจ Farmer Lost Sync! ๐Ÿšจ **
It seems like your farmer lost its connection to the Chia Network

Sync recovery alert

** โœ… Farmer Synced! โœ… **
Your farmer is successfully synced to the Chia Network again

Plots lost alert

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

Plots recovery alert

** โœ… Farmer Plots recoverd! โœ… **
Your farmer's plot count has recovered to its previous value

Metrics

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.

Supported wallet metrics

  • Total balance (chia_confirmed_total_mojos)

Supported full node metrics

  • Sync status (chia_sync_status)
  • Peak height (chia_peak_height)
  • Difficulty (chia_diffculty)
  • Total netspace (chia_network_space)
  • Connection count (chia_connections_count)

Supported harvester metrics

  • 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)

Supported farmer metrics

  • 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)

Supported pooling metrics

  • Current Points (chia_current_pool_points)
  • Current difficulty (chia_current_pool_difficulty)
  • Points found (chia_pool_points_found_since_start)
  • Points acknowledged (chia_pool_points_acknowledged_since_start)
  • Pool errors 24h (chia_num_pool_errors_24h)

Prerequisites

To run this tool, we need the following things:

  • Python 3
  • Pipenv

Linux (Ubuntu)

sudo apt install python3 pipenv

Installation

  1. Clone the repository
git clone https://github.com/philippnormann/chia-monitor.git
cd chia-monitor
  1. Install the required dependecies
pipenv install 
  1. Initialize the SQLite database
pipenv run alembic upgrade head
  1. Copy the example config file
cp config-example.json config.json
  1. Open up config.json and configure it to your preferences.

Updating

  1. Pull the latest release from git
cd chia-monitor
git reset origin/main --hard
git pull
  1. Update the required dependecies
pipenv install
  1. Upgrade the SQLite database model
pipenv run alembic upgrade head

Usage

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.

Basic Prometheus Configuration

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.

Architecture

architecture

Owner
Philipp Normann
Master in IT-Security at @fh-wedel. TensorFlorist at @otto-de
Philipp Normann
๐Ÿ”€โณ Easy throttling with asyncio support

Throttler Zero-dependency Python package for easy throttling with asyncio support. ๐Ÿ“ Table of Contents ๐ŸŽ’ Install ๐Ÿ›  Usage Examples Throttler and Thr

Ramzan Bekbulatov 80 Dec 07, 2022
Sample project showing reliable data ingestion application using FastAPI and dramatiq

Create and deploy a reliable data ingestion service with FastAPI, SQLModel and Dramatiq This is the source code for the data ingestion service explain

Franรงois Voron 31 Nov 30, 2022
FastAPI CRUD template using Deta Base

Deta Base FastAPI CRUD FastAPI CRUD template using Deta Base Setup Install the requirements for the CRUD: pip3 install -r requirements.txt Add your D

Sebastian Ponce 2 Dec 15, 2021
cookiecutter template for web API with python

Python project template for Web API with cookiecutter What's this This provides the project template including minimum test/lint/typechecking package

Hitoshi Manabe 4 Jan 28, 2021
Learn to deploy a FastAPI application into production DigitalOcean App Platform

Learn to deploy a FastAPI application into production DigitalOcean App Platform. This is a microservice for our Try Django 3.2 project. The goal is to extract any and all text from images using a tec

Coding For Entrepreneurs 59 Nov 29, 2022
Dead simple CSRF security middleware for Starlette โญ and Fast API โšก

csrf-starlette-fastapi Dead simple CSRF security middleware for Starlette โญ and Fast API โšก Will work with either a input type="hidden" field or ajax

Nathaniel Sabanski 9 Nov 20, 2022
Pagination support for flask

flask-paginate Pagination support for flask framework (study from will_paginate). It supports several css frameworks. It requires Python2.6+ as string

Lix Xu 264 Nov 07, 2022
Stac-fastapi built on Tile38 and Redis to support caching

stac-fastapi-caching Stac-fastapi built on Tile38 to support caching. This code is built on top of stac-fastapi-elasticsearch 0.1.0 with pyle38, a Pyt

Jonathan Healy 4 Apr 11, 2022
User authentication fastapi with python

user-authentication-fastapi Authentication API Development Setup environment You should create a virtual environment and activate it: virtualenv venv

Sabir Hussain 3 Mar 03, 2022
A minimal FastAPI implementation for Django !

Caution!!! This project is in early developing stage. So use it at you own risk. Bug reports / Fix PRs are welcomed. Installation pip install django-m

toki 23 Dec 24, 2022
Redis-based rate-limiting for FastAPI

Redis-based rate-limiting for FastAPI

Glib 6 Nov 14, 2022
A rate limiter for Starlette and FastAPI

SlowApi A rate limiting library for Starlette and FastAPI adapted from flask-limiter. Note: this is alpha quality code still, the API may change, and

Laurent Savaete 562 Jan 01, 2023
REST API with FastAPI and PostgreSQL

REST API with FastAPI and PostgreSQL To have the same data in db: create table CLIENT_DATA (id SERIAL PRIMARY KEY, fullname VARCHAR(50) NOT NULL,email

Luis Quiรฑones Requelme 1 Nov 11, 2021
FastAPI + Postgres + Docker Compose + Heroku Deploy Template

FastAPI + Postgres + Docker Compose + Heroku Deploy โš ๏ธ For educational purpose only. Not ready for production use YET Features FastAPI with Postgres s

DP 12 Dec 27, 2022
FastAPI interesting concepts.

fastapi_related_stuffs FastAPI interesting concepts. FastAPI version :- 0.70 Python3 version :- 3.9.x Steps Test Django Like settings export FASTAPI_S

Mohd Mujtaba 3 Feb 06, 2022
Code for my FastAPI tutorial

FastAPI tutorial Code for my video tutorial FastAPI tutorial What is FastAPI? FastAPI is a high-performant REST API framework for Python. It's built o

Josรฉ Haro Peralta 9 Nov 15, 2022
A FastAPI WebSocket application that makes use of ncellapp package by @hemantapkh

ncellFastAPI author: @awebisam Used FastAPI to create WS application. Ncellapp module by @hemantapkh NOTE: Not following best practices and, needs ref

Aashish Bhandari 7 Oct 01, 2021
Light, Flexible and Extensible ASGI API framework

Starlite Starlite is a light and flexible ASGI API framework. Using Starlette and pydantic as foundations. Check out the Starlite documentation ๐Ÿ“š Cor

1.5k Jan 04, 2023
An alternative implement of Imjad API | Imjad API ็š„ๅผ€ๆบๆ›ฟไปฃ

HibiAPI An alternative implement of Imjad API. Imjad API ็š„ๅผ€ๆบๆ›ฟไปฃ. ๅ‰่จ€ ็”ฑไบŽImjad API่ฟ™ๆ˜ฏไป€ไนˆ?ไฝฟ็”จไบบๆ•ฐ่ฟ‡ๅคš, ่‡ดไฝฟ่ฐƒ็”จ่ถ…ๅ‡บ้™ๅˆถ, ๆ‰€ไปฅๆœฌไบบๅธŒๆœ›ๆไพ›ไธ€ไธชๅผ€ๆบๆ›ฟไปฃๆฅไพ›็คพๅŒบ่ฟ›่กŒ่‡ช็”ฑ็š„้ƒจ็ฝฒๅ’Œไฝฟ็”จ, ไปŽ่€Œๅ‡่ฝปไธ€้ƒจๅˆ†่ฏฅAPI็š„ไฝฟ็”จๅŽ‹ๅŠ› ไผ˜ๅŠฟ

Mix Technology 450 Dec 29, 2022
API using python and Fastapi framework

Welcome ๐Ÿ‘‹ CFCApi is a API DEVELOPMENT PROJECT UNDER CODE FOR COMMUNITY ! Project Walkthrough ๐Ÿš€ CFCApi run on Python using FASTapi Framework Docs The

Abhishek kushwaha 7 Jan 02, 2023