Guardian
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
Release files for guardian 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| guardian-0.2.3.tar.gz | 19.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| guardian-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.4 kB
Release files / guardian-0.2.3.tar.gz
| Download URL | guardian-0.2.3.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08c8679ecf601668414284a294ffeb760aed12f3e7a5d76c9160c5217f01d373
|
|
BLAKE2b-256 checksum How to use checksums |
7e1221942f59da204735115a6bce7677bfdc01d3b7c8630f27cee6c081aec028
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2025.
Transparency logRelease files / guardian-0.2.3-py3-none-any.whl
| Download URL | guardian-0.2.3-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aef5f6253eda4ce58f31f734356c443a98c76823cf759569e17184035489b4b6
|
|
BLAKE2b-256 checksum How to use checksums |
dccf8e91450a306f012eb3e61082ecdf8a8751d35870c721d040ae9c16091f84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2025.
Transparency log