Compare commits
No commits in common. "18a540b7e28aef117fc5a2d801b2f6fd08c93fc8" and "1e1dff9ab01c937cddf358a5b595e733831ff758" have entirely different histories.
18a540b7e2
...
1e1dff9ab0
50
README.md
50
README.md
|
@ -1,50 +0,0 @@
|
||||||
# BadNews: Matrix Bot, Bringer of Bad News
|
|
||||||
|
|
||||||
## What is this?
|
|
||||||
|
|
||||||
`BadNews` is a [Matrix](https://matrix.org) 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](https://github.com/matrix-org/matrix-rust-sdk) and getting some simple
|
|
||||||
alerts from my hosted services.
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
Write up a configuration file at `config.yaml`:
|
|
||||||
|
|
||||||
```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:
|
|
||||||
|
|
||||||
``` sh
|
|
||||||
cargo run -- --config config.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
I accept contributions via [GitHub](https://github.com/alarsyo/bad-news) Pull
|
|
||||||
Requests and [GitLab](https://gitlab.com/alarsyo/bad-news) Merge Requests.
|
|
||||||
|
|
||||||
### Sending patches by mail
|
|
||||||
You can also send patches to
|
|
||||||
[~alarsyo/patches@lists.sr.ht](https://lists.sr.ht/~alarsyo/patches) with the
|
|
||||||
prefix `PATCH bad-news`.
|
|
||||||
|
|
||||||
You can use the following commands to set up `git` appropriately;
|
|
||||||
|
|
||||||
``` sh
|
|
||||||
git config sendemail.to '~alarsyo/patches@lists.sr.ht'
|
|
||||||
git config format.subjectPrefix 'PATCH bad-news'
|
|
||||||
```
|
|
31
README.org
Normal file
31
README.org
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#+title: BadNews: Matrix Bot, Bringer of Bad News
|
||||||
|
|
||||||
|
* What is this?
|
||||||
|
|
||||||
|
=BadNews= is a [[https://matrix.org][Matrix]] bot, watching your systemd/journald logs, and reporting
|
||||||
|
bad news to you.
|
||||||
|
|
||||||
|
* Why?
|
||||||
|
|
||||||
|
A mix of wanting to toy around with the [[https://github.com/matrix-org/matrix-rust-sdk][matrix_sdk crate]] and getting some
|
||||||
|
simple alerts from my hosted services.
|
||||||
|
|
||||||
|
* Setup
|
||||||
|
|
||||||
|
Write up a configuration file at =config.yaml=:
|
||||||
|
|
||||||
|
#+begin_src 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:
|
||||||
|
- nginx.service
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Then run the bot:
|
||||||
|
|
||||||
|
#+begin_src sh
|
||||||
|
cargo run -- --config config.yaml
|
||||||
|
#+end_src
|
Loading…
Reference in a new issue