Lifeguard integration with RabbitMQ
Project description
Lifeguard RabbitMQ
Usage
Configure plugin in lifeguard_settings.py
.
import lifeguard_rabbitmq
PLUGINS = [lifeguard_rabbitmq]
Settings
Name | Description | Value |
---|---|---|
LIFEGUARD_RABBITMQ_\w+_ADMIN_BASE_URL | RabbitMQ admin base url of default instance | http://localhost:15672 |
LIFEGUARD_RABBITMQ_\w+_ADMIN_USER | RabbitMQ admin user of default instance | guest |
LIFEGUARD_RABBITMQ_\w+_ADMIN_PASSWD | RabbitMQ admin password of default instance | guest |
LIFEGUARD_RABBITMQ_\w+_ADMIN_VHOST | RabbitMQ admin virtual host of default instance | / |
LIFEGUARD_RABBITMQ_INSTANCES | List of rabbitmq instances separated by comma | default |
Builtin Validations
Consumers Running Validation
Usage example:
# in lifeguard_settings.py
from lifeguard_rabbitmq import RABBITMQ_PLUGIN_CONTEXT
from lifeguard import NORMAL, PROBLEM
from lifeguard.actions.email import send_email
RABBITMQ_PLUGIN_CONTEXT.consumers_validation_options = {
"actions": [send_email],
"schedule": {"every": {"minutes": 1}},
"settings": {
"email": {
"subject": "[Lifeguard] - Consumers validation",
"receivers": [{"name": "User", "email": "user@cserver.com"}],
"send_in": [PROBLEM],
"remove_from_sent_list_when": [NORMAL],
}
},
"queues": {
"default": [{"name": "lifeguard.queue.example", "min_number_of_consumers": 1}],
},
}
Messages Increasing Validation
Usage example:
# in lifeguard_settings.py
from lifeguard_rabbitmq import RABBITMQ_PLUGIN_CONTEXT
from lifeguard import NORMAL, PROBLEM
from lifeguard.actions.database import save_result_into_database
RABBITMQ_PLUGIN_CONTEXT.messages_increasing_validation_options = {
"actions": [save_result_into_database],
"schedule": {"every": {"minutes": 1}},
"settings": {},
"queues": {
"default": [{"name": "lifeguard.queue.example", "count_before_alert": 10}],
},
}
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 lifeguard-rabbitmq-1.0.0.tar.gz
.
File metadata
- Download URL: lifeguard-rabbitmq-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6dd90134e9b762aa4acfda50659a1489ff4b6d463a5a2e5a5c594fa744ec9e1 |
|
MD5 | 4ace19147db4ad9685f52433d19451f4 |
|
BLAKE2b-256 | 8be79b67c359cdfef2f3ee65c7e46290b7aded4e7cbed3b2ca6d6539e1639919 |
File details
Details for the file lifeguard_rabbitmq-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: lifeguard_rabbitmq-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe7b01788cf31a634d853bf1b7b5a537073c2cf9bc91b1ad1e44fb5a3f3423e1 |
|
MD5 | 6e2591bbeabdbefd70e68f3454a4d83c |
|
BLAKE2b-256 | b0b5b6af71f835d4062176cd520e12aef3a37326527cc558c6101c11f3019151 |