Giter VIP home page Giter VIP logo

website-change-monitor's Introduction

Website Change Monitor

Website Change Monitor

A small web app written in Node.js to monitor specific changes on a web page


Features

  • Support any public web page

  • Track specific parts (text, markup, css class, img, etc..)

  • Custom tracking frequency (seconds, minutes, hours, days)

  • Email alert notification (with SendGrid)

  • Slack alert notification

  • Daily email to confirm that the app is working

  • Front page (just to check that the system is working and to ping it if necessary (Useful for Heroku)


How it works

The App request the urlToCheck every checkingFrequency and if any of the elementsToSearchFor are detected, a notification is sent to your Slack channel and all the emailsToAlert list.


Installation

  1. Clone this repo git clone https://github.com/JuanmaMenendez/website-change-monitor.git

  2. Inside the "website-change-monitor" folder, run the command npm install

  3. In server.js, edit the "Main configuration variables"

    urlToCheck = "http://urlyouwant.com/tocheck";
    elementsToSearchFor = ['Text you want to watch for', 'imageYouWantToCheckItsExistence.png'];
    checkingFrequency = 5 * 60000;  //5 minutes
    
  4. Slack Integration

    4.1 Activate the WebHooks in your WorkSpace and get the corresponding 'WebHook URL'

    4.2 In server.js, set the 'WebHook URL' in SLACK_WEBHOOK_URL = 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX';

  5. SendGrid Email Integration

    5.1 Create a SendGrid Free Account

    5.2 Create and get an API KEY with Full Access

    5.3 In server.js, set the 'API KEYS' in SENDGRID_APY_KEY = 'AA.AAAA_AAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';

    5.4 In server.js, set the sender email in the emailFrom variable. Code: emailFrom = "[email protected]";

    Now, to avoid falling into the "SPAM" folder there are two options:

    a) Configure SendGrid to white list your sender email.

    Go to https://app.sendgrid.com/settings/mail_settings > Address Whitelist > Edit > Add your email address (Eg: [email protected]) > Switch to ON

    Note: For a less chance to fall in the SPAM folder, use an email address that you own and one of these methods to validate it.

    b) Put any email address in the emailFrom variable and add it to the white list in the receiver email client.

    5.5 In server.js, set the emailsToAlert array. Code: emailsToAlert = ["[email protected]", "[email protected]"];


Usage

  1. node server.js

Extras

  • To update the "Working OK" email notification frequency, you can change the variable checkingNumberBeforeWorkingOKEmail. By default it is set to 1440 (the number of minutes a day has)

website-change-monitor's People

Contributors

juanmamenendez avatar arch-linux 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.