Skip to content

wwfdoink/url-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-monitor

Monitor urls using headless chromium and compare the result using GraphicsMagick. Output is using Nagios format.

Installation

Install GraphicsMagick: http://www.graphicsmagick.org/download.html

Install nodejs dependencies:

$ npm install

Run

$ node app.js 

Running options

    --config="./config.js" # run with different config file
    --ref # force to create new reference images

Configuration (config.js)

// ============
// config.js
// ============
module.exports = {
    browser: {
        // Maximum number of browser tabs
        threads: 5,
        // If you want to capture the whole page not just the viewport
        fullPageCapture: true,
        // Size of the browser window
        viewport: {
            width: 1366,
            height: 768
        },
    },
    // nagios thresholds based on image compare result
    criticalThreshold: 0.002,
    warningThreshold: 0.001,
    // Path to save all the images
    historyPath: "./history",
    // URLs to process
    urls: [
        "file:///D:/5/1.html",
        "file:///D:/5/2.html",
        "file:///D:/5/3.html",
    ],
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published