πŸƒ 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
FastAPI pagination

FastAPI Pagination Installation # Basic version pip install fastapi-pagination # All available integrations pip install fastapi-pagination[all] Avail

Yurii Karabas 561 Jan 07, 2023
A basic JSON-RPC implementation for your Flask-powered sites

Flask JSON-RPC A basic JSON-RPC implementation for your Flask-powered sites. Some reasons you might want to use: Simple, powerful, flexible and python

Cenobit Technologies 273 Dec 01, 2022
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
This project shows how to serve an ONNX-optimized image classification model as a web service with FastAPI, Docker, and Kubernetes.

Deploying ML models with FastAPI, Docker, and Kubernetes By: Sayak Paul and Chansung Park This project shows how to serve an ONNX-optimized image clas

Sayak Paul 104 Dec 23, 2022
Voucher FastAPI

Voucher-API Requirement Docker Installed on system Libraries Pandas Psycopg2 FastAPI PyArrow Pydantic Uvicorn How to run Download the repo on your sys

Hassan Munir 1 Jan 26, 2022
FastAPI Skeleton App to serve machine learning models production-ready.

FastAPI Model Server Skeleton Serving machine learning models production-ready, fast, easy and secure powered by the great FastAPI by SebastiΓ‘n RamΓ­re

268 Jan 01, 2023
fastapi-mqtt is extension for MQTT protocol

fastapi-mqtt MQTT is a lightweight publish/subscribe messaging protocol designed for M2M (machine to machine) telemetry in low bandwidth environments.

Sabuhi 144 Dec 28, 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
Formatting of dates and times in Flask templates using moment.js.

Flask-Moment This extension enhances Jinja2 templates with formatting of dates and times using moment.js. Quick Start Step 1: Initialize the extension

Miguel Grinberg 358 Nov 28, 2022
Cookiecutter template for FastAPI projects using: Machine Learning, Poetry, Azure Pipelines and Pytests

cookiecutter-fastapi In order to create a template to FastAPI projects. πŸš€ Important To use this project you don't need fork it. Just run cookiecutter

Arthur Henrique 225 Dec 28, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 310 Dec 14, 2022
A utility that allows you to use DI in fastapi without Depends()

fastapi-better-di What is this ? fastapi-better-di is a utility that allows you to use DI in fastapi without Depends() Installation pip install fastap

Maxim 9 May 24, 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
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 web application using [FastAPI + streamlit + Docker] Neural Style Transfer (NST) refers to a class of software algorithms that manipulate digital images

Neural Style Transfer Web App - [FastAPI + streamlit + Docker] NST - application based on the Perceptual Losses for Real-Time Style Transfer and Super

Roman Spiridonov 3 Dec 05, 2022
Flask-vs-FastAPI - Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks.

Flask-vs-FastAPI Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks. IntroductionIn Flask is a popular mic

Mithlesh Navlakhe 1 Jan 01, 2022
API written using Fast API to manage events and implement a leaderboard / badge system.

Open Food Facts Events API written using Fast API to manage events and implement a leaderboard / badge system. Installation To run the API locally, ru

Open Food Facts 5 Jan 07, 2023
Prometheus exporter for Starlette and FastAPI

starlette_exporter Prometheus exporter for Starlette and FastAPI. The middleware collects basic metrics: Counter: starlette_requests_total Histogram:

Steve Hillier 225 Jan 05, 2023
FastAPI backend for Repost

Repost FastAPI This is the FastAPI implementation of the Repost API. Installation Python 3 must be installed and accessible through the use of a termi

PC 7 Jun 15, 2021
Get MODBUS data from Sofar (K-TLX) inverter through LSW-3 or LSE module

SOFAR Inverter + LSW-3/LSE Small utility to read data from SOFAR K-TLX inverters through the Solarman (LSW-3/LSE) datalogger. Two scripts to get inver

58 Dec 29, 2022