Skip to content

Ne00n/statibus

Repository files navigation

statibus

Minimalistic Statuspage with 30,60s interval Ping, Port & HTTP(S) IPv4 & IPv6 Monitoring.

Overview

Key Points

  • rqlite database
  • PHP 7.3+ (bcmath,curl)
  • Handmade css, no framework, about 2kb
  • Zero Javascript

ToDo

  • nothin

QuickSetup:

  1. Get a rqlite instance up and running
    Check configs/rqlite.service if you wish to run rqlite as a service.
  2. Rename configs/config.example.php to configs/config.php, you may edit it
  3. To Initialize the databse run:
php cli.php init
  1. You can add the first service by running:
php cli.php group add Servers
php cli.php service add Servers Server ping 8.8.8.8
  1. Enable the cronjobs, see => configs/cron|uptime.example
    Run cron every 60s, uptime is for generating the uptime percentages, every 5 minutes is fine
  2. Optional you use remote probes to confirm downtimes.
    To do this, put the check.php file in content/remotes on a remote server, whitelist the statibus ip and add it to statibus.
    You should add at least 2 remotes, the more the better. The queries will be rotated between the remotes.

You can access the databse anytime via ./rqlite in case the commands are not enough.

Caching

rqlite has its limits at about 250 requests per second, due to the raft consensus.
So you should setup some type of caching, 1s is enough to prevent rqlite from not responding to queries.

Updating

SQL Migrations: https://github.com/Ne00n/statibus/tree/main/migrations

CLI

service

php cli.php service add <group> <name> <method> <target> <timeout> <httpcode(s)> <keyword>

Examples:

php cli.php service add Servers Server ping 8.8.8.8
php cli.php service add Servers Service port 8.8.8.8:80 2
php cli.php service add Servers Website http https://website.com 2 200
php cli.php service add Servers Website http https://website.com 2 400,404
php cli.php service add Servers Keyword http https://keyword.com 2 200 clusterfuck
php cli.php service list
php cli.php service delete <name>

group

php cli.php group add <name>
php cli.php group list
php cli.php group delete <name>

remotes (optional)

#url example: https://check.com/check.php you can rename the file of course
php cli.php remote add <name> <url>
php cli.php remote list
php cli.php remote delete <name>

About

Minimalistic Statuspage with rqlite and php

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published