HTTP(s) "monitoring" webpage via FastAPI+Jinja2. Inspired by https://github.com/RaymiiOrg/bash-http-monitoring

Overview

python-http-monitoring

HTTP(s) "monitoring" powered by FastAPI+Jinja2+aiohttp.

Inspired by bash-http-monitoring.

Installation can be done with pipenv or Docker. Targets can be changed on runtime since they are read in each request (if you're running on Docker just mount the file as a volume). Request customization is also possible (retries per request, time between retries, etc.).

Targets will be flagged as "down" if they take longer than the timeout or the expected http status code is different than the one expected.

TODO (No ETA...):

Notifications
Historic metrics
Support other HTTP methods

Installation

Minimum requirements to run locally:

Otherwise, if you want to run it in a container:

  • Docker

Locally:

git clone https://github.com/itzkvn/python-http-monitoring.git
cd python-http-monitoring
pipenv shell
pipenv install
cd app
uvicorn main:app --port 18080

Docker:

If you want to try it out:

docker run -it --rm -p 18080:80 kollowz/python-http-monitoring

If you want to mount a configuration file:

docker run -it --rm -p 18080:80 -v "/path/to/targets.yml:/app/targets.yml" kollowz/python-http-monitoring

Either way you access the website at 127.0.0.1:18080/target/status.

Configuration

Configuration for this proyect consists in two files:

app/targets.yml and app/settings.py

targets.yml: targets to check Each target consists of:

  • display: Display name in the website (Maybe you want to see "My website" instead of "http://yourwebsite.com").
  • url: URL to check (ex: "https://www.google.com").
  • expected_http_code: Status code that will be validated against response status code (this is, mostly, what makes a check go either green or red).

settings.py: "backend" configuration

  • TARGETS_FILE: Configuration file for targets.
  • REQUEST_RETRIES: # of retries per url (only retries if it fails).
  • REQUEST_RETRIES_WAIT: # of seconds between retries.
  • REQUEST_TIMEOUT: # of seconds till timeout per request.
  • REQUEST_HTTP_CODE: Default expected HTTP status code.

Screenshots

Error view

Big target list

¿Why did I make this?

Saw bash-http-monitoring on r/selfhosted and had a weekend free to hack on something. Thought this was a fun enough challenge so here it is :)

Owner
itzk
itzk
Debugging-friendly exceptions for Python

Better tracebacks This is a more helpful version of Python's built-in exception message: It shows more code context and the current values of nearby v

Clemens Korndörfer 1.2k Dec 28, 2022
A watchdog and logger to Discord for hosting ScPrime servers.

ScpDog A watchdog and logger to Discord for hosting ScPrime servers. Designed to work on Linux servers. This is only capable of sending the logs from

Keagan Landfried 3 Jan 10, 2022
Python bindings for g3log

g3logPython Python bindings for g3log This library provides python3 bindings for g3log + g3sinks (currently logrotate, syslog, and a color-terminal ou

4 May 21, 2021
Summarize LSF job properties by parsing log files.

Summarize LSF job properties by parsing log files of workflows executed by Snakemake.

Kim 4 Jan 09, 2022
Keylogger with Python which logs words into server terminal.

word_logger Experimental keylogger with Python which logs words into server terminal.

Selçuk 1 Nov 15, 2021
Pretty and useful exceptions in Python, automatically.

better-exceptions Pretty and more helpful exceptions in Python, automatically. Usage Install better_exceptions via pip: $ pip install better_exception

Qix 4.3k Dec 29, 2022
Vibrating-perimeter - Simple helper mod that logs how fast you are mining together with a simple buttplug.io script to control a vibrator

Vibrating Perimeter This project consists of a small minecraft helper mod that writes too a log file and a script that reads said log. Currently it on

Heart[BOT] 0 Nov 20, 2022
A basic logging library for Python.

log.py 📖 About: A basic logging library for Python with the capability to: save to files. have custom formats. have custom levels. be used instantiat

Sebastiaan Bij 1 Jan 19, 2022
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"

Text progress bar library for Python. Travis status: Coverage: Install The package can be installed through pip (this is the recommended method): pip

Rick van Hattem 795 Dec 18, 2022
Integrates a UPS monitored by NUT into OctoPrint

OctoPrint UPS This OctoPrint plugin interfaces with a UPS monitored by NUT (Network UPS Tools). Requirements NUT must be configured by the user. This

Shawn Bruce 11 Jul 05, 2022
giving — the reactive logger

giving is a simple, magical library that lets you log or "give" arbitrary data throughout a program and then process it as an event stream.

Olivier Breuleux 0 May 24, 2022
👻 - Simple Keylloger with Socket

Keyllogs 👻 - Simple Keylloger with Socket Keyllogs 🎲 - Run Keyllogs

Bidouffe 3 Mar 28, 2022
A Prometheus exporter for monitoring & analyzing Grafana Labs' technical documentation

grafana-docs-exporter A Prometheus exporter for monitoring & analyzing Grafana Labs' technical documentation Here is the public endpoint.

Matt Abrams 5 May 02, 2022
Multi-processing capable print-like logger for Python

MPLogger Multi-processing capable print-like logger for Python Requirements and Installation Python 3.8+ is required Pip pip install mplogger Manual P

Eötvös Loránd University Department of Digital Humanities 1 Jan 28, 2022
A colored formatter for the python logging module

Log formatting with colors! colorlog.ColoredFormatter is a formatter for use with Python's logging module that outputs records using terminal colors.

Sam Clements 778 Dec 26, 2022
Colored terminal output for Python's logging module

coloredlogs: Colored terminal output for Python's logging module The coloredlogs package enables colored terminal output for Python's logging module.

Peter Odding 496 Dec 30, 2022
Beautifully colored, quick and simple Python logging

Python Quick Logging | QLogging Beautifully colored, quick and simple Python logging. This logger is based on Python logging package Screenshots: Term

45 Sep 25, 2022
A Python package which supports global logfmt formatted logging.

Python Logfmter A Python package which supports global logfmt formatted logging. Install $ pip install logfmter Usage Before integrating this library,

Joshua Taylor Eppinette 15 Dec 29, 2022
Logging system for the TPC software.

tpc_logger Logging system for the TPC software. The TPC Logger class provides a singleton for logging information within C++ code or in the python API

UC Davis Machine Learning 1 Jan 10, 2022
A python library used to interact with webots robocup game web logs

A python library used to interact with webots robocup game web logs

Hamburg Bit-Bots 2 Nov 05, 2021