Code Monkey home page Code Monkey logo

statibus's Introduction

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>

statibus's People

Contributors

ne00n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.