mqtt-to-pagerduty
Read from a MQTT topic and generate a alert in PagerDuty.
Installation
Direct install
pip install mqtt_to_pagerduty
Docker
docker pull unixorn/mqtt-to-pagerduty
Configuration
mqtt-to-pagerduty looks for a yaml configuration file in ~/.hass-tools/mqtt-to-pagerduty.yaml, or /config/mqtt-to-pagerduty.yaml when run in a container.
Configuration example
pagerduty-api-token: XYZZY
mqtt-server: mqtt.example.com
topic: hass/alerts
default-sender: your_pd_user@example.com
service_id: XYZZY
Tools
mqtt-alerter
Creates an alert message and writes it to a MQTT topic for processing by mqtt-topic-to-pd.
usage: mqtt-alerter [-h] [-d] [-l {DEBUG,INFO,ERROR,WARNING,CRITICAL}] [--settings-file SETTINGS_FILE] [--sender SENDER]
[--mqtt-server MQTT_SERVER] --title TITLE --service-id SERVICE_ID [--message MESSAGE] [--topic TOPIC]
Emit messages into a MQTT topic
optional arguments:
-h, --help show this help message and exit
-d, --debug Debug setting
-l {DEBUG,INFO,ERROR,WARNING,CRITICAL}, --log-level {DEBUG,INFO,ERROR,WARNING,CRITICAL}
set log level
--settings-file SETTINGS_FILE, --settings SETTINGS_FILE
Path to settings file. Settings in the file are overridden by command line options
--sender SENDER Email address to send alerts from
--mqtt-server MQTT_SERVER
MQTT Server to use
--title TITLE Message title
--service-id SERVICE_ID
PagerDuty service ID to alert
--message MESSAGE Message to send
--topic TOPIC MQTT topic to write to
mqtt-topic-to-pd
Listens to a MQTT topic and when it sees an alert message, creates a corresponding PagerDuty alert.
usage: mqtt-topic-to-pd [-h] [--api-token API_TOKEN] [-l {DEBUG,INFO,ERROR,WARNING,CRITICAL}] [--settings-file SETTINGS_FILE]
[--duration DURATION] [--sender SENDER] [--service-id SERVICE_ID] [--mqtt-server MQTT_SERVER]
[--topic TOPIC]
Read an MQTT queue and create PagerDuty alerts
optional arguments:
-h, --help show this help message and exit
--api-token API_TOKEN
PagerDuty api token
-l {DEBUG,INFO,ERROR,WARNING,CRITICAL}, --log-level {DEBUG,INFO,ERROR,WARNING,CRITICAL}
set log level
--settings-file SETTINGS_FILE, --settings SETTINGS_FILE
Path to settings file. Settings in the file are overridden by command line options
--duration DURATION How long to read the topic, in seconds
--sender SENDER Email address to send alerts from
--service-id SERVICE_ID
Service ID to create an alert
--mqtt-server MQTT_SERVER
MQTT server
--topic TOPIC MQTT topic to read
Metadata
Release files for mqtt-to-pagerduty 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mqtt-to-pagerduty-0.2.1.tar.gz | 9.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mqtt_to_pagerduty-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.4 kB
Release files / mqtt-to-pagerduty-0.2.1.tar.gz
| Download URL | mqtt-to-pagerduty-0.2.1.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc1aac867a7496003d117b167dbf97a54c2467f5aa05d711d7b926bbc5ba23a0
|
|
BLAKE2b-256 checksum How to use checksums |
1bd760b02b4bfe265f2b35f783bd81351373674e4539ae240809acfc01c70088
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.7 Darwin/21.3.0
|
Release files / mqtt_to_pagerduty-0.2.1-py3-none-any.whl
| Download URL | mqtt_to_pagerduty-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14471e2517b1166bcf5173aab365e1330c1e3e9087b0fa8cc25ecdfaa3cf642b
|
|
BLAKE2b-256 checksum How to use checksums |
597d3268d03872d8745f3cc229f87c3b8195877c5fbcce4f293dffcba6065ecd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.7 Darwin/21.3.0
|
Security for mqtt-to-pagerduty 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.