A Node.js HTTP monitor
Pull request Compare This branch is 517 commits behind iloire:master.
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, you will get a notification. Once the service is up again you get another notification (just email transport protocol for now by using postmark). You define notifications recipients per url, host or application level.

There is a related blog post about watchmen here.


watchmen daemon running:

watchmen daemon

list of hosts:

List of hosts

host downtime and warning details:

Host downtime and warning details


Edit config.js:

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

        host: 'letsnode.com',
        ping_interval: one_minute, //set ping interval (in seconds)
        failed_ping_interval: one_minute, //set ping interval if site is down (in seconds)
        enabled: true, //enables/disables this host
        alert_to: ['ivan@iloire.com'], //emails to alert if site goes down.
        warning_if_takes_more_than: 700, //miliseconds. alert if request takes more than this
        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: false, //if disabled, no email will be sent (just console messages)
        To: 'ivan@iloire.com',
        postmark : {
            From: 'ivan@iloire.com',
            Api_key : 'your-postmark-key-here'

c) Define logging options

    exports.logging = {
        Enabled: true,
        base_path : './logs' //use last "/"

d) Run watchmen

    $ node watchmen.js

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

    $ forever start watchmen.js



  • Added expiration time to event records
  • Stores avg response time for each url.
  • Warns if response time > limit.
  • Multiple recipients in notifications.
  • Removed "retry_in" option. Watchmen works in a smarter way now.
  • REDIS backend.
  • Web UI to display reports (express.js app using REDIS backend).


  • Be able to disable entries in config file at url level
  • When site is back, displays and logs information about how long the site has been down.


  • Logs "site down" and "site back up" messages to a file (logs in a different file per host)
  • Fix bug when reading url_conf.attempts on site back.


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


  • First release.


  • Google charts
  • Uptime stats info
  • Change configuration from control panel
  • Reset stats from control panel
  • Create NPM package
  • Regular expressions support