- Kotlin 88.2%
- JavaScript 5.6%
- CSS 4.5%
- Dockerfile 1%
- Just 0.7%
| assets | ||
| gradle | ||
| specs | ||
| src | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| 6status.yml.example | ||
| build.gradle.kts | ||
| docker-compose.yml | ||
| Dockerfile | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
6status
I wanted a status board that handles dual-stack protocol configurations for IPv4 and IPv6, to ensure both endpoints were up when checking for availability. 6status always writes and serves up static status pages, that can be displayed without Javascript (although Javascript is required for dynamic updates). The Javascript can also show an alert if the stats page server itself cannot be reached.
Getting Started with Docker Compose
You can use docker compose up to get 6status up with a Postgres backing container. You will need to copy 6status.yml.example to 6stats.yml and configure it to yor needs.
git clone https://forge.sumit.im/djsumdog/6status
cd 6status
cp 6status.yml.example 6stats.yml
vim 6stats.yml # or whatever your editor is
# if you have just installed
just run
# if not, jst run docker compose directly
docker compose up
Configuration
Each bar on the status chart covers one status_interval (general section; minutes/hours/days, e.g. 30m, 2h, 1d, default 1h). All checks that ran within an interval are aggregated: the interval is only green if every check passed, a single failed check marks the whole interval red (partially-up checks mark it yellow), and intervals with no data at all stay gray.
general:
check_interval: "*/5 * * * *"
status_interval: 1h
Prometheus
A /metrics endpoint exposes a service_availability gauge (1 = up, 0 = down) for every individual check, labelled with service=, title=, type= and check=. The overall status of each service is reported as check="all", and is only 1 when the service is fully up:
service_availability{service="main-web",title="Example Website",type="https",check="all"} 1
service_availability{service="main-web",title="Example Website",type="https",check="HTTPS"} 1
6status has several checks that can be configured in the checks section of the configuration YAML. The names (keys) can be whatever you want. They're be displayed in the order defined.
HTTP checks
The most basic check is for web connectivity
main-web:
title: Example
type: https
host: example.com
redirects: www.example.com
enable_ipv6: true # default. Can be omitted
It supports checking redirects (e.g for subdomains like www). enable_ipv6 is a setting on all checks, is enabled by default and can be omitted.
Healthchecks
https services can have one application-level healthcheck. It is intentionally opaque: visitors (and the sample API) only ever see a check called "Health Check" that passed or failed — the endpoint and match rules are never sent to the browser, and failure details only appear in the server logs. A json healthcheck requires the response to be valid JSON and the jq expression to evaluate truthy; a text healthcheck takes either search (case-insensitive substring) or regex (raw regex or /pattern/flags with i, m, s flags), but not both. Invalid healthchecks (wrong service type, bad regex, both search and regex, ...) are logged and skipped without affecting the service's other checks.
main-web:
title: Example Website
type: https
host: example.com
healthcheck:
endpoint: /api/pleroma/healthcheck
type: json
jq: '.healthy == true'
XMPP
The XMPP status checks for service connectivity (client to server and server to server), valid TLS certificates and can optionally check for legacy TLS ports.
my-xmpp-server:
title: XMPP Chat Server
type: xmpp
host: xmpp.example.im
enable_tls: true # default
explicit_tls_ports: false # default. Set true to also probe legacy direct-TLS ports 5223/5270
The worst system to self-host. Why would anyone do this? Why do I do this?
email:
title: E-Mail Systems
type: mail
host: mail.example.com
enable_submission: true # default
enable_tls: true # default
enable_imap: true # default
enable_pop: false # default
Settings should be pretty self-explanatory.
Development
This was spec driven. I think it works though. It was generated with a mix of GLM-5.2 and Fable-5. I wrote the README though. This was 100% human, but I think the machine has updated it since. It's still probably greater than 50% human. If this section disappears the machines have taken over. I wouldn't be surprised if they tried to Mandella Effect that license down there with a BFG and force push. I guess I shouldn't give the coggers any ideas. Consider this a machine canary.