bderenzo / tinystatus Goto Github PK
View Code? Open in Web Editor NEWStatic status page generator
License: MIT License
Static status page generator
License: MIT License
Steps to reproduce:
Edit checks.csv, add:
port, 0, Google DNS (tcp/53), 8.8.8.8 53
Script will now produce error:
tinystatus: line 45: /tmp/tmp.vrQmtcfIoZ/ok/Google DNS (tcp/53).status: No such file o r directory
I believe is caused by the fact that the script seems to use the check name string as the file name to store the status result. I think an easy way to fix this would be to do a hash of the name string and use as filename instead. For example: something like:
echo "Status code: ${statuscode}" > "${tmp}/ok/${name}.status"
would be changed into:
name_hash=hashname=$(echo -n "$name" | sha256sum | awk '{print $1}')
echo "Status code: ${statuscode}" > "${tmp}/ok/${name_hash}.status"
If sha256sum is not available, the script could fall back to sha1sum or even md5sum, cryptographic strengh is not too important here.
Hello,
I was wondering if having the incidents log automatically generate was something you were interested in?
And, if so this what sort of requirements would you have for it?
For example:
/tmp
and are removed once the script exists, but you do have checks stored as a CSV file.For example, say you want to monitor:
abc.com
minecraft game server
nop.net
teamspeak server port
xyz.com
Currently we can't group the websites and the servers seperately, I think our only option is numbering them to force arrange them - IE
01-abc.com
02-nop.com
03-xyz.com
04-minecraft game server etc etc
If we had a way to create 1,2 or 3 groups it would make things a bunch neater.
website1
website2
gameserver1
gameserver2
Loving the project by the way, thank you!
I've made several updates to my fork https://github.com/thomasjsn/tinystatus
You want a pull request for any of these changes?
Hi all,
Just really adding this here as a helper for anyone looking to implement on Linux using systems.
Not saying this is at all the correct way. I'm running this all through Saltstack so apologies if this isn't directly applicable.
Ive used a "runner" file to control the actions outside the processing script:
Changes to directory where the project is cloned, runs the script and generates a temporary file, moves it over the previous file were the webserver is looking.
#!/bin/bash
cd /home/vagrant/tinystatus
./tinystatus > /home/vagrant/tinystatus/index.html.tmp
mv /home/vagrant/tinystatus/index.html.tmp /var/www/tinystatus/index.html
Then I have a systemd service:
[Unit]
Description=Tinystatus reports availability of services
Wants=tinystatus.timer
[Service]
Type=simple
User=vagrant
Group=vagrant
ExecStart=/home/vagrant/tinystatus.runner.sh
[Install]
WantedBy=multi-user.target
And a systemd timer:
[Unit]
Description=Timer that periodically triggers tinystatus.service
Requires=tinystatus.service
[Timer]
OnCalendar=minutely
[Install]
WantedBy=timers.target
The service and timer are then enabled and timer started.
Looking over this, for one of our project's needs it's mostly just missing a way to display upcoming events (eg scheduled maintenance, changes, etc).
Any interest in a PR for adding that?
If so, I can put something together, likely modelled on the existing checks.csv.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.