Giter Site home page Giter Site logo

pinger's Introduction

Pinger

Description

A simple site checker to see if your site is down. It checks periodically every minute.

How to use it

Open pinger.rb, change on line 4 the @yoursite variable with your site you want to monitor and run the script with ruby pinger.rb. You can add it as a background job by running ruby pinger.rb & or you can also create a bash script to daemonize it. For changing the time it will run the check, change line 27 where is the sleep.

What is does

It is pretty simple, it checks if your site returns 200 http request. If it won't, it means that either you don't have internet or your site is down. So it runs the write_log method and checks if you have access to google, if you have a valid 301 request then your site is down, if you don't then it means you don't have internet. Finally it writes on disconnect.log the time of the incident and what happened.

Future

I may create a method for sending an email when your site is down.

pinger's People

Contributors

johndel avatar

Watchers

Justin Mui avatar James Cloos avatar

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.