From c59d4bbb60a56eb8a69d3896390b9610b62a5be3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 3 May 2024 23:48:45 +0200 Subject: doc --- readme.md | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 2b745c4..a3755af 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,45 @@ # statuspage -A simple configurable status page for your hosted services. Reports issues via email. +A simple configurable status page for your hosted services. Reports issues via +email. -TODO: Documentation +## Building + +The usual rust build system. Just use `cargo build --release` if unsure and use +the resulting binary in `target/release/statuspage`. Once this is "stable +software" I will submit a PKGBUILD to the AUR. + +## Configuration + +The configuration file uses YAML and is supplied by path in the first argument +of the server. Until I make better documentation, you can infer usage from this +example: + +```yaml +title: "metamuffin.org service status" +bind: 127.0.0.1:8000 +interval: 60 # check interval in seconds + +mail: # the entire mail section is optional + from: status@example.org + to: [admin@example.org] + smtp_auth: !plain # can be !plain, !starttls or !tls + smtp_server: 127.0.0.1 + smtp_port: 8025 +# smtp_username: admin # optional smtp auth +# smtp_password: hunter2 + +services: + - title: keks-meet + url: https://meet.metamuffin.org/ # url shown on the page. + # each service has a number of "checks" that need to + # be successful for the service to be considered working. + checks: + - !pacman keks-meet-server # this uses pacman -Q to check the installed version of some software + - !systemd keks-meet-server # this checks the ActiveState of a systemd service + - !http { url: https://meet.metamuffin.org/ } # this checks that status code of a HTTP request for success + + - title: failing service + checks: + - !shell { title: "Do nothing unsuccessfully", command: "false" } # this runs a command and checks the exit code +``` -- cgit v1.2.3-70-g09d2