Skip to main content

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

lifeguard_rabbitmq-1.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lifeguard_rabbitmq-1.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file lifeguard_rabbitmq-1.1.1.tar.gz.

File metadata

  • Download URL: lifeguard_rabbitmq-1.1.1.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

Hashes for lifeguard_rabbitmq-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c7f373dca4a3c9e310670c1ffa7ca17c01e03eb8646e253f3f917c66faed3fbf
MD5 a21bfa1346d15cb35a5ae6bdf32b56fc
BLAKE2b-256 696903815a9dca22d1b8904ac71db6defd4a47757f33548241039ecce640e0e2

See more details on using hashes here.

File details

Details for the file lifeguard_rabbitmq-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lifeguard_rabbitmq-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d52355170de59469688c69aabdbf5c64170700c44c7d842a5a8c914e8f9a5ff3
MD5 e9866b62d6a59239be61b264a75722f9
BLAKE2b-256 adb3eba17f071e71316864c702c606e5afad2af1dff324c5b3887ea90407016f

See more details on using hashes here.

Supported by

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