Blame


1 8f8a96f5 2023-05-31 mischa # Uptime Atomic
2 fe3bb093 2023-05-30 mischa
3 8f8a96f5 2023-05-31 mischa uptimeatomic alerts when downtime happens and generates an html status page via shell script.
4 fe3bb093 2023-05-30 mischa
5 fe3bb093 2023-05-30 mischa ## Features
6 fe3bb093 2023-05-30 mischa
7 fe3bb093 2023-05-30 mischa * Parallel checks
8 fe3bb093 2023-05-30 mischa * HTTP, ping, port checks
9 fe3bb093 2023-05-30 mischa * HTTP expected status code (401, ...)
10 fe3bb093 2023-05-30 mischa * Minimal dependencies (curl, nc and coreutils)
11 fe3bb093 2023-05-30 mischa * Easy configuration and customisation
12 fe3bb093 2023-05-30 mischa * Tiny (~1kb) optimized result page
13 fcac9574 2023-06-03 mischa * Incident and maintenance history (manual)
14 fcac9574 2023-06-03 mischa * RSS feed for incidents and maintenance messages
15 f42e67a9 2023-05-30 mischa * Crontab friendly
16 fe3bb093 2023-05-30 mischa
17 fe3bb093 2023-05-30 mischa ## Demo
18 fe3bb093 2023-05-30 mischa
19 8f8a96f5 2023-05-31 mischa An example site is available [here](https://ops.lowfive.nl/)
20 fe3bb093 2023-05-30 mischa
21 fe3bb093 2023-05-30 mischa ## Setup
22 fe3bb093 2023-05-30 mischa
23 8f8a96f5 2023-05-31 mischa To install uptimeatomic:
24 fe3bb093 2023-05-30 mischa
25 fe3bb093 2023-05-30 mischa * Clone the repository and go to the created directory
26 d8d124d6 2023-06-03 mischa * Edit `uptimeatomic.conf` variables to your liking
27 fe3bb093 2023-05-30 mischa * Edit the checks file `checks.csv`
28 fe3bb093 2023-05-30 mischa * To add incidents or maintenance, edit `incidents.txt`
29 8f8a96f5 2023-05-31 mischa * To add past incidents or maintenance, edit `pastincidents.txt`
30 8f8a96f5 2023-05-31 mischa * Generate status page `./uptimeatomic`
31 fe3bb093 2023-05-30 mischa * Serve the page with your favorite web server
32 fe3bb093 2023-05-30 mischa
33 fe3bb093 2023-05-30 mischa ## Configuration file
34 fe3bb093 2023-05-30 mischa
35 fe3bb093 2023-05-30 mischa The syntax of `checks.csv` file is:
36 541faf21 2023-05-31 mischa
37 fe3bb093 2023-05-30 mischa ```
38 135c428d 2023-05-31 mischa Command, Expected Code, Status Text, Host to check, Timeout (sec)
39 135c428d 2023-05-31 mischa http, 200, Google Website, https://google.com,20
40 8f8a96f5 2023-05-31 mischa maint, 200, Google Drive Maintenance, https://drive.google.com
41 8f8a96f5 2023-05-31 mischa ping, 0, Google ping, 8.8.8.8
42 8f8a96f5 2023-05-31 mischa port, 0, Google DNS, 8.8.8.8 53
43 fe3bb093 2023-05-30 mischa ```
44 fe3bb093 2023-05-30 mischa
45 fe3bb093 2023-05-30 mischa Command can be:
46 fe3bb093 2023-05-30 mischa * `http` - Check http status
47 fe3bb093 2023-05-30 mischa * `ping` - Check ping status
48 fe3bb093 2023-05-30 mischa * `port` - Check open port status
49 fe3bb093 2023-05-30 mischa * `maint` - Host is in maintance
50 fe3bb093 2023-05-30 mischa
51 fe3bb093 2023-05-30 mischa There are also `http4`, `http6`, `ping4`, `ping6`, `port4`, `port6` for IPv4 or IPv6 only check.
52 fe3bb093 2023-05-30 mischa Note: `port4` and `port6` require OpenBSD `nc` binary.
53 fe3bb093 2023-05-30 mischa
54 135c428d 2023-05-31 mischa The default timeout is set in `uptimeatomic` but can be set in `checks.csv` per host.
55 135c428d 2023-05-31 mischa
56 fcac9574 2023-06-03 mischa ## Incidents / Maintenance
57 fcac9574 2023-06-03 mischa
58 0e3585c4 2023-06-03 mischa
59 fcac9574 2023-06-03 mischa The syntax of the `incidents.txt` and `pastincidents.txt` files is:
60 fcac9574 2023-06-03 mischa
61 fcac9574 2023-06-03 mischa ```
62 fcac9574 2023-06-03 mischa Datetime, Type, Description
63 f59c0f4b 2023-06-03 mischa 202305231230, Incident, There was a service disruption on 2023-05-23 at 12:23 UTC
64 fcac9574 2023-06-03 mischa 202306031700, Maintenance, Server maintenance is scheduled on 2023-07-13 at 00:00 UTC
65 6892c406 2023-06-03 mischa ```
66 fcac9574 2023-06-03 mischa
67 77e3036e 2023-05-30 mischa ## Parameters
68 77e3036e 2023-05-30 mischa
69 77e3036e 2023-05-30 mischa ```
70 a26142d0 2023-06-03 mischa ./uptimeatomic -c CHECKFILE -i INCIDENTSFILE -p PASTINCENTSFILE -o HTMLFILE -r RSSFILE
71 77e3036e 2023-05-30 mischa Default:
72 a26142d0 2023-06-03 mischa -c = checks.csv (default)
73 a26142d0 2023-06-03 mischa -i = incidents.txt (default)
74 a26142d0 2023-06-03 mischa -p = pastincidents.txt (default)
75 a26142d0 2023-06-03 mischa -o = index.html (default)
76 acea22e3 2023-06-11 mischa -r = rss file (no default, optional)
77 77e3036e 2023-05-30 mischa ```
78 a1d4bed3 2023-06-03 mischa
79 a1d4bed3 2023-06-03 mischa For example:
80 a1d4bed3 2023-06-03 mischa
81 a1d4bed3 2023-06-03 mischa ```
82 a1d4bed3 2023-06-03 mischa ./uptimeatomic -c services.csv -o status.html -r rss.xml
83 a1d4bed3 2023-06-03 mischa ```
84 a1d4bed3 2023-06-03 mischa