GithubHelp home page GithubHelp logo

watchdog's Introduction

Watchdog

logo

Watchdog is a visual website monitoring app. It was created as a self-hosted alternative to commercial solutions such as visualping and sken.io. With Watchdog, you can monitor changes on websites. Two comparison methods are supported.

Visual comparisons

Watchdog periodically captures a screenshot of any given web page, and looks for any pixel-level changes between the current and previously captured screenshot. If a change is big enough, a notification email will be sent. You can crop the screenshot to focus only on a specific part on the page.

watchdog_demo.mp4
Sample notification sample email

Text comparisons

Watchdog can also detect text-based changes on the page. Whenever there is a change, a notification email will be sent. You can use CSS selectors to monitor changes only in a single element. Alternatively, you can define a set of keywords, and Watchdog will notify you whenever those words are either found or not found on the page.

How to deploy

It is recommended to deploy Watchdog using Docker. However, you can also deploy it manually.

Once deployed, create a new admin account with the same username as defined in ADMIN_USERNAME. Log in, go to Settings and configure the email settings.

Docker

Backend

Provide your own values for JWT_SECRET, and APP_URL in environment in the watchdog_api container in docker-compose.yml. If needed, adjust port and network values to suit your needs.

Frontend

Add the REACT_APP_API_PATH environment variable to the watchdog_frontend container in docker-compose.yml. This should be the base URL of the API, i.e. the same value as APP_URL in watchdog_api container.

Start the containers with the following command.

docker compose up -d

The frontend should be available at port 3000.

To stop the containers, run

docker compose down
Manual deployment

Backend

In order to run the backend server, a .env file must be placed in the backend folder. Fill in the following details.

# Database settings
MONGODB_URI="mongodb://127.0.0.1:27017/watchdog"

# JWT settings
JWT_SECRET=<Some long random string>
JWT_EXPIRES_IN=<e.g. "30d">

# Port
PORT=3001

# Base URL
APP_URL=<Base URL of the api, e.g. https.//example-api.com>

# File path
FILES_PATH="./files"

# Admin username
# Account with this name will receive admin rights
ADMIN_USERNAME="admin"

After this, you can start the server. If you want to run it persistently, use forever or pm2.

Install packages needed for the server

cd backend
npm install

PM2

npm install -g pm2@latest
pm2 start index.js

Forever

npm install -g forever
forever start index.js

Frontend

Install and build.

npm install
npm run build

The built site will be in /build.

watchdog's People

Contributors

einoko avatar

Watchers

 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.