A Matrix bot, bringer of bad news
Find a file
2021-04-10 03:40:47 +02:00
.github/workflows ci: setup cachix build 2021-04-10 03:40:47 +02:00
src bot: don't bother processing empty messages 2021-04-10 02:17:10 +02:00
.gitignore flake: setup flake.nix 2021-04-10 03:24:44 +02:00
.lohr remove empty line from .lohr file 2021-04-09 20:30:12 +02:00
Cargo.lock config: store and parse 'filter' as regex 2021-04-10 02:05:01 +02:00
Cargo.toml config: store and parse 'filter' as regex 2021-04-10 02:05:01 +02:00
flake.lock flake: setup flake.nix 2021-04-10 03:24:44 +02:00
flake.nix flake: setup flake.nix 2021-04-10 03:24:44 +02:00
README.md README: switch to markdown format 2021-04-10 02:28:28 +02:00

BadNews: Matrix Bot, Bringer of Bad News

What is this?

BadNews is a Matrix bot, watching your systemd/journald logs, and reporting bad news to you.

Why?

A mix of wanting to toy around with the matrix_sdk crate and getting some simple alerts from my hosted services.

Setup

Write up a configuration file at config.yaml:

homeserver: "https://matrix.example.net"
username: "bad-news"
password: "matrix password for user bad-news"
state_dir: "state/"
room_id: "!DeaDbEef:example.net"
units:
  - name: nginx.service
    filter: "\\[warn\\] .*"

Then run the bot:

cargo run -- --config config.yaml

Contributing

I accept contributions via GitHub Pull Requests and GitLab Merge Requests.

Sending patches by mail

You can also send patches to ~alarsyo/patches@lists.sr.ht with the prefix PATCH bad-news.

You can use the following commands to set up git appropriately;

git config sendemail.to '~alarsyo/patches@lists.sr.ht'
git config format.subjectPrefix 'PATCH bad-news'