Alertmanager webhook for meshtastic
This little Adapter receives alertmanager webhooks and sends the notifications via a over serial attached Meshtastic device to the specified nodeID.
Warning Caution: The Tests that are provided for the code in this repository are not currently updated! Also this is a quickly hacked together peace of software, that has not built any security in it at the moment. If you have the skill and the time to contribute in any way, take a look at the Contribution section
Credits
This is based on the work of https://github.com/homeworkprod/weitersager Thanks to GUVWAF for the support and thanks to the whole meshtastic team for this awsome software!
Alertmanager configuration example
receivers:
- name: 'meshtastic-webhook'
webhook_configs:
- url: http://alertmanager-meshtastic:9119/alert
send_resolved: true
config.toml example
This is an example config, that shows all of the config options.
log_level = "debug"
[general]
inputtimeshift = 2 # this time in hours will be added to the "in" time of the message that gets sent to the client
statustimeshift = 2 # this time in hours will be added to the "status" time of the message (startsAt/endsAt) that gets sent to the client
[http]
host = "0.0.0.0"
port = 9119
clearsecret = "your_secret_key"
[meshtastic.connection]
tty = "/tmp/vcom0"
nodeid = 631724152
maxsendingattempts = 30
timeout = 60
docker compose service example - Hardware Serial (default)
To integrate this bridge into your composed prometheus/alertmanager cluster, this is a good startingpoint.
alertmanagermeshtastic:
image: apfelwurm/alertmanagermeshtastic
ports:
- 9119:9119
devices:
-/dev/ttyACM0
volumes:
- ./alertmanager-meshtastic/config.toml:/app/config.toml
restart: always
docker compose service example - Virtual Serial
To integrate this bridge into your composed prometheus/alertmanager cluster, this is a good startingpoint. If you plan to use a virtual serial port that is provided with socat you have to use the socat connector in this container or run your alertmanagermeshtastic instance on the terminating linux machine, because the reconnecting is not working if you either mount it as volume or as a device.
alertmanagermeshtastic:
image: apfelwurm/alertmanagermeshtastic
ports:
- 9119:9119
environment:
- SOCAT_ENABLE=TRUE
- SOCAT_CONNECTION=tcp:192.168.178.46:5000
volumes:
- ./alertmanager-meshtastic/config.toml:/app/config.toml
restart: always
Note: If you set SOCAT_ENABLE to TRUE, the tty option from [meshtastic.connection] in config.toml will be overwritten with /tmp/vcom0 as thats the virtual serial port.
Running on docker example - Hardware Serial (default)
docker run -d --name alertmanagermeshtastic \
--device=/dev/ttyACM0 \
-v ./alertmanager-meshtastic/config.toml:/app/config.toml \
-p 9119:9119 apfelwurm/alertmanagermeshtastic:latest
Running on docker example - Virtual Serial
If you plan to use a virtual serial port that is provided with socat you have to use the socat connector in this container or run your alertmanagermeshtastic instance on the terminating linux machine, because the reconnecting is not working if you either mount it as volume or as a device.
docker run -d --name alertmanagermeshtastic \
--env SOCAT_ENABLE=TRUE --env SOCAT_CONNECTION=tcp:192.168.178.46:5000 \
-v ./alertmanager-meshtastic/config.toml:/app/config.toml \
-p 9119:9119 apfelwurm/alertmanagermeshtastic:latest
Note: If you set SOCAT_ENABLE to TRUE, the tty option from [meshtastic.connection] in config.toml will be overwritten with /tmp/vcom0 as thats the virtual serial port.
Metrics for Prometheus
You cann add this as an exporter to your scrape config, for example:
scrape_configs:
- job_name: "alertmanager-meshtastic"
scrape_interval: 10s
static_configs:
- targets: ["alertmanager-meshtastic:9119"]
it will return the metrics
message_queue_size (int/gauge)
meshtastic_connected (bool/gauge)
Contribution
This is currently a minimal implementation that supports only a single node as a receiver. If you need additional features, you are welcome to open an issue, or even better, submit a pull request. You can also take a look on the opened Issues, where i have opened some for planned features and work on them if you want. I would appreciate any help.
Example to test
You can use the test.sh or the test single.sh or the following curl command to test alertmanager-meshtastic
curl -XPOST --data '{"status":"resolved","groupLabels":{"alertname":"instance_down"},"commonAnnotations":{"description":"i-0d7188fkl90bac100 of job ec2-sp-node_exporter has been down for more than 2 minutes.","summary":"Instance i-0d7188fkl90bac100 down"},"alerts":[{"status":"resolved","labels":{"name":"olokinho01-prod","instance":"i-0d7188fkl90bac100","job":"ec2-sp-node_exporter","alertname":"instance_down","os":"linux","severity":"page"},"endsAt":"2019-07-01T16:16:19.376244942-03:00","generatorURL":"http://pmts.io:9090","startsAt":"2019-07-01T16:02:19.376245319-03:00","annotations":{"description":"i-0d7188fkl90bac100 of job ec2-sp-node_exporter has been down for more than 2 minutes.","summary":"Instance i-0d7188fkl90bac100 down"}}],"version":"4","receiver":"infra-alert","externalURL":"http://alm.io:9093","commonLabels":{"name":"olokinho01-prod","instance":"i-0d7188fkl90bac100","job":"ec2-sp-node_exporter","alertname":"instance_down","os":"linux","severity":"page"}}' http://alertmanager-meshtastic:9119/alert
Metadata
Release files for alertmanagermeshtastic 2025.8.10.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 | Actions |
|---|---|---|---|---|
| alertmanagermeshtastic-2025.8.10.1.tar.gz | 18.3 kB | With provenance | Details for alertmanagermeshtastic-2025.8.10.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| alertmanagermeshtastic-2025.8.10.1-py3-none-any.whl | Python 3 | none | any | Details for alertmanagermeshtastic-2025.8.10.1-py3-none-any.whl |
Total release size: 33.9 kB
Release files / alertmanagermeshtastic-2025.8.10.1.tar.gz
| Download URL | alertmanagermeshtastic-2025.8.10.1.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0831e692897214937bb3c0e298ece20c15882ee7cdd7bc7716702f85467ed25
|
|
BLAKE2b-256 checksum How to use checksums |
ef8364850a0cab6161583fefcefb0f6c5231ace1852ade41ae6e0a5b80fec3e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2025.
Transparency logRelease files / alertmanagermeshtastic-2025.8.10.1-py3-none-any.whl
| Download URL | alertmanagermeshtastic-2025.8.10.1-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cc6ee02fc0fbb0f24c71b4cbac6e99f9b83b59c0df48aa9a309235df092aa92
|
|
BLAKE2b-256 checksum How to use checksums |
fcebc87b63b6503bec7ae4936c8d723ce9910b53806f452d6bc49bf528861dd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2025.
Transparency logSecurity for alertmanagermeshtastic 2025.8.10.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for alertmanagermeshtastic-2025.8.10.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2025.
Transparency logA 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.