matrix

command
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

README

Matrix plugin

Posts each alert to a Matrix room with a bot access token. A retried send reuses its transaction id, so a room never gets a duplicate.

Kind notification_channel, ability read, outbound hosts: matrix.example.com placeholder, see the self-hosted note in docs/plugins-first-party.md.

Config

Plugin-wide, non-secret, passed at install with --config:

{"homeserver": "https://matrix.example.com", "room_id": "!abc123:example.com"}
Field Required Meaning
homeserver yes Homeserver base URL, https only
room_id yes Internal room id starting with !
allow_http no Permit plain http for a lab server

Channel target

The channel's target field holds the bot's access token. It is sealed like any channel credential and sent per call. The plugin never stores or logs it.

levelrail-cli plugins install --manifest plugin.yaml --signature plugin.sig --config config.json --approve read
levelrail-cli channels create --name ops-matrix --kind plugin:matrix --notify-url syt_ACCESS_TOKEN

Behaviour

  • 401 and 403 are permanent ("authentication failed").
  • 429 waits out a short Retry-After and retries, otherwise reports retryable.
  • 5xx and network errors retry twice, then report retryable.
  • Other 4xx are permanent and the response excerpt is shown with the credential redacted.

Build and sign locally with scripts/plugins-build.sh all matrix. Tests: go test ./plugins/matrix.

Documentation

Overview

Command matrix posts alerts to a Matrix room with a bot access token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL