summaryrefslogtreecommitdiff
path: root/README.md
blob: 90220e6aab7ceec7b43317cd6e7f88ae4a871f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# nanostatus

A minimal service status page generator. It runs shell commands to check if your services are up, records the results, and generates a static HTML page showing uptime over the last 30 days.

## Quick start

Install Python 3 if you don't have it:

```sh
pkg install python3
```

Clone the repo and copy the example config:

```sh
git clone https://github.com/yourname/nanostatus
cd nanostatus
cp example.ini status.ini
```

Edit `status.ini` to add your services. Each service needs a name, a shell command that returns 0 on success, and optionally a URL:

```ini
[service:mysite]
url = https://example.com
cmd = curl --fail https://example.com
```

Run it:

```sh
python3 nanostatus.py -c status.ini
```

This writes check results to `./` and generates `./html/status.html`. To run it on a schedule, add a cron job:

```sh
crontab -e
```

```
*/5 * * * * cd /path/to/nanostatus && python3 nanostatus.py -c status.ini
```

Serve `html/status.html` with any web server (nginx, caddy, etc.).