Giter Site home page Giter Site logo

simple-site-monitor's Introduction

Simple Site Monitor Tool

Program to check if a series sites are up and displaying properly plus a small server to serve an RSS feed of any issues found. Feed can be subscribed to using any RSS reader or with something like Boxcar for push notification.

Node

Ensure you run npm install before trying to run this program.

sites.json

This is where you define the site title, site URL and some text to check if the site is displaying properly. It's an array of objects.

[
  {
    "title"  : "My Website",
    "url"    : "http://<site_domain_or_ip>/",
    "phrase" : "text to look for"
  },
  {
    "title"  : "Another Website",
    "url"    : "http://<site_domain_or_ip>/",
    "phrase" : "text to look for"
  }
]

Cron

In your crontab enter the following to run every 30 minutes, change as you see fit.

0,30 * * * * /path/to/node/binary /path/to/app.js

RSS feed

The feed is generated by app.js if any issues are found and written out to rss.xml. You can serve this file any way you wish, or use the included rss.js to create a simple server.

PM2

Included is a 'processes.json' file to quickly get the RSS server up and running with PM2.

Files

File Notes
app.js Program to run every x minutes to check sites via cron
rss.js Simple RSS feed generator and server
sites.json Details of sites to check
rss.xml This is the file generated by app.js
package.json Configuration for NodeJS/io.js/npm
processes.json Configuration for PM2 (pm2 start processes.json)
.gitignore Tells Git what files and folders to ignore
.gitattributes Sets some git env stuff

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.