uptimeatomic/README.md

85 lines
2.2 KiB
Markdown
Raw Normal View History

# Uptime Atomic
2023-05-30 15:04:46 +02:00
uptimeatomic alerts when downtime happens and generates an html status page via shell script.
2023-05-30 15:04:46 +02:00
## Features
* Parallel checks
* HTTP, ping, port checks
* HTTP expected status code (401, ...)
* Minimal dependencies (curl, nc and coreutils)
* Easy configuration and customisation
* Tiny (~1kb) optimized result page
* Incident and maintenance history (manual)
* RSS feed for incidents and maintenance messages
2023-05-30 15:10:56 +02:00
* Crontab friendly
2023-05-30 15:04:46 +02:00
## Demo
An example site is available [here](https://ops.lowfive.nl/)
2023-05-30 15:04:46 +02:00
## Setup
To install uptimeatomic:
2023-05-30 15:04:46 +02:00
* Clone the repository and go to the created directory
2023-06-03 18:04:03 +02:00
* Edit `uptimeatomic.conf` variables to your liking
2023-05-30 15:04:46 +02:00
* Edit the checks file `checks.csv`
* To add incidents or maintenance, edit `incidents.txt`
* To add past incidents or maintenance, edit `pastincidents.txt`
* Generate status page `./uptimeatomic`
2023-05-30 15:04:46 +02:00
* Serve the page with your favorite web server
## Configuration file
The syntax of `checks.csv` file is:
2023-05-31 10:52:46 +02:00
2023-05-30 15:04:46 +02:00
```
2023-05-31 12:48:07 +02:00
Command, Expected Code, Status Text, Host to check, Timeout (sec)
http, 200, Google Website, https://google.com,20
maint, 200, Google Drive Maintenance, https://drive.google.com
ping, 0, Google ping, 8.8.8.8
port, 0, Google DNS, 8.8.8.8 53
2023-05-30 15:04:46 +02:00
```
Command can be:
* `http` - Check http status
* `ping` - Check ping status
* `port` - Check open port status
* `maint` - Host is in maintance
There are also `http4`, `http6`, `ping4`, `ping6`, `port4`, `port6` for IPv4 or IPv6 only check.
Note: `port4` and `port6` require OpenBSD `nc` binary.
2023-05-31 12:48:07 +02:00
The default timeout is set in `uptimeatomic` but can be set in `checks.csv` per host.
## Incidents / Maintenance
2023-06-03 17:11:24 +02:00
The syntax of the `incidents.txt` and `pastincidents.txt` files is:
```
Datetime, Type, Description
2023-06-03 20:18:52 +02:00
202305231230, Incident, There was a service disruption on 2023-05-23 at 12:23 UTC
202306031700, Maintenance, Server maintenance is scheduled on 2023-07-13 at 00:00 UTC
2023-06-03 20:16:21 +02:00
```
2023-06-03 17:11:24 +02:00
2023-05-30 16:28:46 +02:00
## Parameters
```
2023-06-03 20:17:30 +02:00
./uptimeatomic -c CHECKFILE -i INCIDENTSFILE -p PASTINCENTSFILE -o HTMLFILE -r RSSFILE
2023-05-30 16:28:46 +02:00
Default:
2023-06-03 20:17:30 +02:00
-c = checks.csv (default)
-i = incidents.txt (default)
-p = pastincidents.txt (default)
-o = index.html (default)
-r = rss file (no default)
2023-05-30 16:28:46 +02:00
```
2023-06-03 20:14:15 +02:00
For example:
```
./uptimeatomic -c services.csv -o status.html -r rss.xml
```