From 8f8a96f50c804cf9fe0aa6d32d88b3ff1f94e72d Mon Sep 17 00:00:00 2001 From: mischa Date: Wed, 31 May 2023 08:45:22 +0000 Subject: [PATCH] name change from Tinystatus to Uptime Atomic --- LICENSE | 4 ++-- README.md | 20 +++++++++++++------- tinystatus => uptimeatomic | 13 +++++++------ 3 files changed, 22 insertions(+), 15 deletions(-) rename tinystatus => uptimeatomic (94%) diff --git a/LICENSE b/LICENSE index 7144905..c489369 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ MIT License -Copyright (c) 2021 Baptiste DE RENZO -Copyright (c) 2023 Mischa Peters +Copyright (c) 2021 Baptiste DE RENZO https://github.com/bderenzo/tinystatus +Copyright (c) 2023 Mischa Peters https://git.high5.nl/uptimeatomic/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 7ff32f2..f032586 100644 --- a/README.md +++ b/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 @@ -15,17 +15,18 @@ tinystatus generate an html status page via shell script. ## Demo -An example site is available [here](https://lab.bdro.fr/tinystatus/). +An example site is available [here](https://ops.lowfive.nl/) ## Setup -To install tinystatus: +To install uptimeatomic: * 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` * 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 ## Configuration file @@ -33,6 +34,10 @@ To install tinystatus: The syntax of `checks.csv` file is: ``` 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: @@ -47,9 +52,10 @@ Note: `port4` and `port6` require OpenBSD `nc` binary. ## Parameters ``` -./tinystatus -c CHECKFILE -i INCIDENTSFILE -o HTMLFILE +./uptimeatomic -c CHECKFILE -i INCIDENTSFILE -o HTMLFILE Default: -c = checks.csv -i = incidents.txt + -p = pastincidents.txt -o = index.html ``` diff --git a/tinystatus b/uptimeatomic similarity index 94% rename from tinystatus rename to uptimeatomic index c5e41e6..d4a7e5d 100755 --- a/tinystatus +++ b/uptimeatomic @@ -1,7 +1,7 @@ #!/bin/ksh # -# Tinystatus v20230530 -# https://git.high5.nl/tinystatus/ +# Uptime Atomic v20230531 +# https://git.high5.nl/uptimeatomic/ # export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin @@ -16,11 +16,11 @@ PUSHOVER_CONF="/home/mischa/_pushover.conf" PUSHOVER_STATUS="status" RECIPIENT="alerts@high5.nl" REFRESH=60 -SENDER="tinystatus@high5.nl" +SENDER="uptimeatomic@high5.nl" 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" -WORKDIR=/home/mischa/tinystatus +WORKDIR=/home/mischa/uptimeatomic usage() { 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 cat << EOF >> ${_htmlfile} -

Last check: $(date +%FT%T%z) Tinystatus loosely based on Tinystatus

+

Last check: $(date +%FT%T%z)

EOF if [ -s "${PASTINCIDENTSFILE}" ]; then echo '

Past Incidents

' >> ${_htmlfile} sed 's|^\(.*\)$|

\1

|' "${PASTINCIDENTSFILE}" >> ${_htmlfile} fi cat << EOF >> ${_htmlfile} +

Uptime Atomic loosely based on Tinystatus