Skip to main content

Monitor the status of a set of services.

Project description

Guardian

PyPi version

Monitor the status of a set of services. Characteristics:

  • definition of the services to monitor with a YAML file;
  • tests performed by custom scripts (Shell scripts, Python scripts, etc.);
  • no database and serverless;
  • generation of HTML status page;
  • email notifications;
  • IRC notifications.

Installation

$ pipx install guardian
  installed package guardian 0.2.1, Python 3.9.2
  These apps are now globally available
    - guardian
done!  🌟 

You can now use Guardian from anywhere on your system.

Usage

$ guardian --help
usage: guardian [-h] -c CONFIG_FILE [--email] [--irc] [--html]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_FILE, --config CONFIG_FILE
                        Configuration file (YAML).
  --email               Send notification of failed test(s) via email.
  --irc                 Send notification of failed test(s) via IRC.
  --html                Generate a HTML status page.

In order to use notification via IRC you need to install irker. irker is very easy to install and to run, no configuration is needed. Once executed, irker will wait for JSON formatted messages on the port 6659. irker will automatically join the channel you have specified in the Guardian configuration file. irker will maintain connection state for multiple channels, avoiding obnoxious join/leave spam.

Configurations related to the sending of emails are in the same file.

Examples

The goal of the INI configuration file is to set global variables (IRC channel, SMTP server, etc.). If you do not create your own configuration file, the default one will be used automatically.

The services to monitor must be described in one (or several) YAML file(s).

$ cp guardian/config/config.cfg.sample guardian/config/config.cfg
$ cp guardian/config/services.yaml.example guardian/config/services.yaml


$ guardian -c guardian/config/services.yaml
+ Service Newspipe
 - Test about page
     ✅
+ Service MOSP
 - Test main page
      - Test search with API v2
      - Test API v1
     ✅
+ Freshermeat
 - Test main page
     ✅
Execution time: 0.47015 seconds.
✨ 🌟  All 5 tests are successful.

With email notification:

$ guardian -c guardian/config/google-services.yaml --email
+ Google services
 - Test GMail
      - Test Web search
      - Test Google Drive
     1 error occurred.
Execution time: 0:00:00.793011
Sending email notification...

You can combine email notifications, IRC notifications and HTML reporting.

License

Guardian is licensed under GNU Affero General Public License version 3.

Copyright (C) 2021-2025 Cédric Bonhomme

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guardian-0.2.3.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

guardian-0.2.3-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file guardian-0.2.3.tar.gz.

File metadata

  • Download URL: guardian-0.2.3.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for guardian-0.2.3.tar.gz
Algorithm Hash digest
SHA256 08c8679ecf601668414284a294ffeb760aed12f3e7a5d76c9160c5217f01d373
MD5 8f82e52ad0573d6163bc61a44c7158f0
BLAKE2b-256 7e1221942f59da204735115a6bce7677bfdc01d3b7c8630f27cee6c081aec028

See more details on using hashes here.

Provenance

The following attestation bundles were made for guardian-0.2.3.tar.gz:

Publisher: release.yml on cedricbonhomme/guardian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file guardian-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: guardian-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for guardian-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aef5f6253eda4ce58f31f734356c443a98c76823cf759569e17184035489b4b6
MD5 e05c01b1c063e10d37974e1329a7cf5f
BLAKE2b-256 dccf8e91450a306f012eb3e61082ecdf8a8751d35870c721d040ae9c16091f84

See more details on using hashes here.

Provenance

The following attestation bundles were made for guardian-0.2.3-py3-none-any.whl:

Publisher: release.yml on cedricbonhomme/guardian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page