πŸƒ 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
A minimum reproducible repository for embedding panel in FastAPI

FastAPI-Panel A minimum reproducible repository for embedding panel in FastAPI Follow either This Tutorial or These steps below ↓↓↓ Clone the reposito

Tyler Houssian 15 Sep 22, 2022
API for Submarino store

submarino-api API for the submarino e-commerce documentation read the documentation in: https://submarino-api.herokuapp.com/docs or in https://submari

Miguel 1 Oct 14, 2021
Adds integration of the Chameleon template language to FastAPI.

fastapi-chameleon Adds integration of the Chameleon template language to FastAPI. If you are interested in Jinja instead, see the sister project: gith

Michael Kennedy 124 Nov 26, 2022
Generate Class & Decorators for your FastAPI project βœ¨πŸš€

Classes and Decorators to use FastAPI with class based routing. In particular this allows you to construct an instance of a class and have methods of that instance be route handlers for FastAPI & Pyt

Yasser Tahiri 34 Oct 27, 2022
A FastAPI Plug-In to support authentication authorization using the Microsoft Authentication Library (MSAL)

FastAPI/MSAL - MSAL (Microsoft Authentication Library) plugin for FastAPI FastAPI - https://github.com/tiangolo/fastapi FastAPI is a modern, fast (hig

Dudi Levy 15 Jul 20, 2022
Keepalive - Discord Bot to keep threads from expiring

keepalive Discord Bot to keep threads from expiring Installation Create a new Di

Francesco Pierfederici 5 Mar 14, 2022
MQTT FastAPI Wrapper With Python

mqtt-fastapi-wrapper Quick start Create mosquitto.conf with the following content: ➜ /tmp cat mosquitto.conf persistence false allow_anonymous true

Vitalii Kulanov 3 May 09, 2022
Easy and secure implementation of Azure AD for your FastAPI APIs πŸ”’

FastAPI-Azure-auth Azure AD Authentication for FastAPI apps made easy. πŸš€ Description FastAPI is a modern, fast (high-performance), web framework for

Intility 216 Dec 27, 2022
This is an API developed in python with the FastApi framework and putting into practice the recommendations of the book Clean Architecture in Python by Leonardo Giordani,

This is an API developed in python with the FastApi framework and putting into practice the recommendations of the book Clean Architecture in Python by Leonardo Giordani,

0 Sep 24, 2022
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.

Supported tags and respective Dockerfile links python3.8, latest (Dockerfile) python3.7, (Dockerfile) python3.6 (Dockerfile) python3.8-slim (Dockerfil

SebastiΓ‘n RamΓ­rez 2.1k Dec 31, 2022
FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management

FastAPI Server-sided Session FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management.

DevGuyAhnaf 5 Dec 23, 2022
Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.

The Mixer is a helper to generate instances of Django or SQLAlchemy models. It's useful for testing and fixture replacement. Fast and convenient test-

Kirill Klenov 871 Dec 25, 2022
Minecraft biome tile server writing on Python using FastAPI

Blocktile Minecraft biome tile server writing on Python using FastAPI Usage https://blocktile.herokuapp.com/overworld/{seed}/{zoom}/{col}/{row}.png s

Vladimir 2 Aug 31, 2022
Ready-to-use and customizable users management for FastAPI

FastAPI Users Ready-to-use and customizable users management for FastAPI Documentation: https://fastapi-users.github.io/fastapi-users/ Source Code: ht

FastAPI Users 2.3k Dec 30, 2022
Opentracing support for Starlette and FastApi

Starlette-OpenTracing OpenTracing support for Starlette and FastApi. Inspired by: Flask-OpenTracing OpenTracing implementations exist for major distri

Rene Dohmen 63 Dec 30, 2022
FastAPI framework plugins

Plugins for FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi-plugins FastAPI framework plugins Cache Mem

RES 239 Dec 28, 2022
A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication and Rate Limits

A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication and Rate Limits Install You can install this Library with: pip instal

Tert0 33 Nov 28, 2022
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
SuperSaaSFastAPI - Python SaaS Boilerplate for building Software-as-Service (SAAS) apps with FastAPI, Vue.js & Tailwind

Python SaaS Boilerplate for building Software-as-Service (SAAS) apps with FastAP

Rudy Bekker 31 Jan 10, 2023
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