Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple node.js service monitor
JavaScript HTML CSS

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

"watchmen", HTTP monitor for node.js

  • "watchmen" monitors HTTP servers by sending GET or POST pings (HTTP requests) in pre-defined intervals.
  • You can check for a) certain status code or b) a certain text in the response stream.
  • If site is down, ping interval will change (10', 30', 1 hour, etc... set in config file) until the site is back up again. Once the service is up again you get another email.
  • You are notified by email if the site is down by using (you can choose whatever being notified in the first, second, etc.. failure). You will be notified once the site is back up online.


Edit config.js:

a) Define hosts and url's to be monitored:

        host: '',
        ping_interval: one_minute * 5, //set ping interval (in seconds)
        //set retry interval (in minutes), you can add as many intervals as you want
        //if site is still down, will repeat the last interval
        retry_in: [10,30,120], 
        enabled: true, //enables/disables this host
        notify_after_failed_ping: 1, //want to receive notification after "n" failed pings
        urls : [
                method: 'get', 
                url : '/', 
                //expected status code and expected string to be found in the response (otherwise will fail)
                expected: {statuscode: 200, contains: 'A blog about node.js and express.js'}

b) Define Postmark and notifications settings:

    exports.notifications = {
        Enabled: true, //if disabled, just console messages on site down
        To: ''

    exports.postmark = {
        From: 'your-email-here',
        Api_key : 'your-postmark-key-here'

c) Run watchmen

    $ node watchmen.js

or probably you would want to use forever to run it in the background (more commmon)

    $ forever start watchmen.js



  • Allow POST method (for testing forms)
  • Added Marak/colors.js to output success and error messages
  • Displays request duration time
  • Refactoring


  • First release.


  • Create NPM package
  • Write log to file
  • Stats
  • Regular expressions support
  • REDIS support
  • Warning if request takes more than xx miliseconds
Something went wrong with that request. Please try again.