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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lifeguard_rabbitmq-1.1.0.tar.gz.
File metadata
- Download URL: lifeguard_rabbitmq-1.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee5f95628bccdf0d70ab216eed1be0f80a6eece311a835accf19cd41aabc8ab0
|
|
| MD5 |
dad13143600796d14cc6e0df1aeb03de
|
|
| BLAKE2b-256 |
2c4e0cd43bf360e61a69f3ff2e3ce5da1291b97e16239762351a0685b8cba222
|
File details
Details for the file lifeguard_rabbitmq-1.1.0-py3-none-any.whl.
File metadata
- Download URL: lifeguard_rabbitmq-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81c3457c6c996f556af279194976b0f41f1adf24162ce7f8199c814129ce111
|
|
| MD5 |
b3450f2926c5ecd163fde5cb63bdcb17
|
|
| BLAKE2b-256 |
c020f9e819f2046d266b87d12e1133ea0e4abab0f8f06477869b1a17b633c25c
|