Giter Site home page Giter Site logo

tinystatus's People

Contributors

alexpovel avatar bderenzo avatar dreamsvoid avatar julianz avatar kage1 avatar mediumfidelity avatar vbieleny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinystatus's Issues

Script does not handle slash in check name

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.

Automatic Incident log

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:

  • Design limits on storing the incidents between page generation
    • Tests are done within /tmp and are removed once the script exists, but you do have checks stored as a CSV file.
  • How the incidents are presented
    • Would logging the exit code first and last occurrence within a time range be sufficient?
    • e.g. Google (Ping) 2021/07/15 08:00 - 2021/07/15 08:05
  • How many would be presented as a maximum?
    • Anecdotally I added 50+ to a list and it did not look overly pleasing

tiny feature request: group services

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.

web

website1
website2

gameserver

gameserver1
gameserver2

Loving the project by the way, thank you!

Running on Systemd based Linux

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.

Upcoming events?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.