Monitor the status of a set of services.
Project description
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.
Contributing
Patches and questions? Send to my public
inbox:
~cedric/public-inbox@lists.sr.ht
.
Thanks!
License
Guardian is licensed under GNU Affero General Public License version 3.
Copyright (C) 2021-2023 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
Built Distribution
File details
Details for the file guardian-0.2.2.tar.gz
.
File metadata
- Download URL: guardian-0.2.2.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-57-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 658229b3e4caf22136f6bffdd231ea666cc3490cdebc080cef4f814bbef02170 |
|
MD5 | 4b4acfc53a8fc4180ab673283baddc5e |
|
BLAKE2b-256 | 226313d1c942d3114d40fcfa5d27de2d94a3914e91cdd189bad6d35c04efb0a4 |
File details
Details for the file guardian-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: guardian-0.2.2-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-57-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cb6ce4cdc827e27dcd18d81c587331f00fc44c92e8b2547c9da02f18938c38b |
|
MD5 | 0089f16fe0a560ce87b891c1e4499635 |
|
BLAKE2b-256 | 39f82dc6ccc5800aa4c10ed7a9c3ef6cb58a052c950b343b861419bf94b7293b |