This is a fork of tinystatus
. Tinystatus is a service monitoring page generator made with shell script. For information about tinystatus itself, visit tinystatus repo.
This guide explains how to set up and run a forked tinystatus
inside a Docker container using the provided Dockerfile. This is my custom version after I forked it and I don't try to keep in sync with the original.
Before starting, ensure you have the following installed on your system:
Follow these steps to get your Docker container up and running:
Clone the project repository to your local machine using:
git clone https://github.com/chevybowtie/tinystatus.git ./tinystatus-container/
cd tinystatus-container
Build your Docker image from the project directory using the Dockerfile:
docker build --tag tinystatus-image .
tinystatus-image
is a tag. You can change it, but change it in step 3 also.
Run the built image as a container:
docker run --detach --publish 8081:8081 --name tinystatus-container tinystatus-image
tinystatus-container
is a the name of this instance. We will use the name to refer to it with the remaining commands.
Once the container is up and running, the application should now be accessible at http://localhost:8081. Note that the first report will be generated on startup then on the 5's every hour.
To stop the container, execute:
docker stop tinystatus-container
After stopping the container, you can remove it with:
docker rm tinystatus-container
By default, error and access logs are written to /dev/stdout
(see nginx.conf
)
To jump into the container shell for debugging, use:
docker exec -it tinystatus-container /bin/bash
You may customize some things (like the HTML title and header) in tinystatus-config.cfg
before you build the image.
To report issues, open an issue in the GitHub issue tracker for this project.
A cron
task runs the tinystatus
shell script on a schedule. The status page will be regenerated every 5 minutes by reading your configured services to inspect from checks.csv
and any recent outages of note from the incidents.txt
files.
The tinystatus
shell script will attempt to reach out to each configured service and match to the expected response. Then it builds a HTML report on the successes or failures.
If you want to change the 5 minute interval
- in the
Dockerfile
, change the*/5
where thecron
task is created:
RUN (crontab -l ; echo "*/5 * * * * /usr/bin/tinystatus /etc/tinystatus/checks.csv /etc/tinystatus/incidents.txt | tee /var/www/html/index.html") | crontab -
See https://crontab.guru/ if you need help creating your cron
schedule.
There is a footnote you'll want to change in the HTML too (see tinystatus
).
The syntax of checks.csv
file is:
Command, Expected Code, Status Text, Host to check
Command can be:
http
- Check http statusping
- Check ping statusport
- Check open port status
There are also http4
, http6
, ping4
, ping6
, port4
, port6
for IPv4 or IPv6 only check.