boreq / statuspage

Home Page:https://status.0x46.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Statuspage

I created this project because all existing self-hosted alternatives had way too many dependencies and were annoying to use. With this one you just get one binary and run it.

Installation

Using Go toolchain

$ go install github.com/boreq/statuspage-backend/cmd/statuspage@latest

Configuration

Creating a config file

$ statuspage default_config > config.json

If you want this thing to be exposed publicly without a reverse proxy server then change the address to the format :port instead of 1.2.3.4:port. You need to set paths to two directories: scriptsDirectory and dataDirectory. scriptsDirectory contains your monitor definitions (see next section) and dataDirectory is where the database used by the program will be stored.

Creating monitors

Each monitor consists of two files. The first file is a JSON file which specifies some metadata around the monitor and the second file is the script executed to check if the monitored resource is "up" or "down". Those files are named <somename>.json and somename respectfully. Make sure that the script file is executable by the user running this software. Here is an example:

$ ls scripts
web web.json

$ cat web.json
{
  "name": "Web server for example.com"
}

$ cat web
#!/bin/bash
set -e
URL="https://example.com/"
curl --fail -I -v -- "$URL" 2>&1

Recommended directory structure

I usually arrange my files like this:

$ tree
.
├── config.json
├── data
│   ├── 000000.vlog
│   ├── LOCK
│   └── MANIFEST
└── scripts
    ├── web
    ├── web.json
    ├── api
    └── api.json

Running the software

$ statuspage run config.json

About

https://status.0x46.net

License:GNU Affero General Public License v3.0


Languages

Language:Go 69.8%Language:SCSS 15.5%Language:CSS 12.8%Language:Makefile 1.9%