name change from Tinystatus to Uptime Atomic
This commit is contained in:
parent
d42ca95a4b
commit
8f8a96f50c
4
LICENSE
4
LICENSE
|
@ -1,7 +1,7 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 Baptiste DE RENZO
|
Copyright (c) 2021 Baptiste DE RENZO https://github.com/bderenzo/tinystatus
|
||||||
Copyright (c) 2023 Mischa Peters
|
Copyright (c) 2023 Mischa Peters https://git.high5.nl/uptimeatomic/
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
20
README.md
20
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Tinystatus
|
# Uptime Atomic
|
||||||
|
|
||||||
tinystatus generate an html status page via shell script.
|
uptimeatomic alerts when downtime happens and generates an html status page via shell script.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -15,17 +15,18 @@ tinystatus generate an html status page via shell script.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
An example site is available [here](https://lab.bdro.fr/tinystatus/).
|
An example site is available [here](https://ops.lowfive.nl/)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
To install tinystatus:
|
To install uptimeatomic:
|
||||||
|
|
||||||
* Clone the repository and go to the created directory
|
* Clone the repository and go to the created directory
|
||||||
* Edit `tinystatus` variables to your liking
|
* Edit `uptimeatomic` variables to your liking
|
||||||
* Edit the checks file `checks.csv`
|
* Edit the checks file `checks.csv`
|
||||||
* To add incidents or maintenance, edit `incidents.txt`
|
* To add incidents or maintenance, edit `incidents.txt`
|
||||||
* Generate status page `./tinystatus`
|
* To add past incidents or maintenance, edit `pastincidents.txt`
|
||||||
|
* Generate status page `./uptimeatomic`
|
||||||
* Serve the page with your favorite web server
|
* Serve the page with your favorite web server
|
||||||
|
|
||||||
## Configuration file
|
## Configuration file
|
||||||
|
@ -33,6 +34,10 @@ To install tinystatus:
|
||||||
The syntax of `checks.csv` file is:
|
The syntax of `checks.csv` file is:
|
||||||
```
|
```
|
||||||
Command, Expected Code, Status Text, Host to check
|
Command, Expected Code, Status Text, Host to check
|
||||||
|
http, 200, Google Website, https://google.com
|
||||||
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
Command can be:
|
Command can be:
|
||||||
|
@ -47,9 +52,10 @@ Note: `port4` and `port6` require OpenBSD `nc` binary.
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
```
|
```
|
||||||
./tinystatus -c CHECKFILE -i INCIDENTSFILE -o HTMLFILE
|
./uptimeatomic -c CHECKFILE -i INCIDENTSFILE -o HTMLFILE
|
||||||
Default:
|
Default:
|
||||||
-c = checks.csv
|
-c = checks.csv
|
||||||
-i = incidents.txt
|
-i = incidents.txt
|
||||||
|
-p = pastincidents.txt
|
||||||
-o = index.html
|
-o = index.html
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/ksh
|
#!/bin/ksh
|
||||||
#
|
#
|
||||||
# Tinystatus v20230530
|
# Uptime Atomic v20230531
|
||||||
# https://git.high5.nl/tinystatus/
|
# https://git.high5.nl/uptimeatomic/
|
||||||
#
|
#
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||||
|
|
||||||
|
@ -16,11 +16,11 @@ PUSHOVER_CONF="/home/mischa/_pushover.conf"
|
||||||
PUSHOVER_STATUS="status"
|
PUSHOVER_STATUS="status"
|
||||||
RECIPIENT="alerts@high5.nl"
|
RECIPIENT="alerts@high5.nl"
|
||||||
REFRESH=60
|
REFRESH=60
|
||||||
SENDER="tinystatus@high5.nl"
|
SENDER="uptimeatomic@high5.nl"
|
||||||
TIMEOUT=10
|
TIMEOUT=10
|
||||||
TITLE="Tiny Status"
|
TITLE="Uptime Atomic"
|
||||||
USERAGENT="User-Agent: Mozilla/5.0 (OpenBSD; Intel OpenBSD 7.4; rv:109.0) Gecko/20100101 Firefox/113.0"
|
USERAGENT="User-Agent: Mozilla/5.0 (OpenBSD; Intel OpenBSD 7.4; rv:109.0) Gecko/20100101 Firefox/113.0"
|
||||||
WORKDIR=/home/mischa/tinystatus
|
WORKDIR=/home/mischa/uptimeatomic
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: ${0##*/} [-c checksfile] [-i incidentsfile] [-p pastincidentsfile] [-o htmlfile]" 1>&2
|
echo "usage: ${0##*/} [-c checksfile] [-i incidentsfile] [-p pastincidentsfile] [-o htmlfile]" 1>&2
|
||||||
|
@ -198,13 +198,14 @@ ls ${tmp}/ok/*.status 2>/dev/null | sort -V | while read file; do
|
||||||
done
|
done
|
||||||
cat << EOF >> ${_htmlfile}
|
cat << EOF >> ${_htmlfile}
|
||||||
</ul>
|
</ul>
|
||||||
<p class=small> Last check: $(date +%FT%T%z) <a href="https://git.high5.nl/tinystatus/">Tinystatus</a> loosely based on <a href="https://github.com/bderenzo/tinystatus">Tinystatus</a></p>
|
<p class=small>Last check: $(date +%FT%T%z)</p>
|
||||||
EOF
|
EOF
|
||||||
if [ -s "${PASTINCIDENTSFILE}" ]; then
|
if [ -s "${PASTINCIDENTSFILE}" ]; then
|
||||||
echo '<h1>Past Incidents</h1>' >> ${_htmlfile}
|
echo '<h1>Past Incidents</h1>' >> ${_htmlfile}
|
||||||
sed 's|^\(.*\)$|<p>\1</p>|' "${PASTINCIDENTSFILE}" >> ${_htmlfile}
|
sed 's|^\(.*\)$|<p>\1</p>|' "${PASTINCIDENTSFILE}" >> ${_htmlfile}
|
||||||
fi
|
fi
|
||||||
cat << EOF >> ${_htmlfile}
|
cat << EOF >> ${_htmlfile}
|
||||||
|
<p class=small><a href="https://git.high5.nl/uptimeatomic/">Uptime Atomic</a> loosely based on <a href="https://github.com/bderenzo/tinystatus">Tinystatus</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue