0.1.0 • Published 8 years ago

hubot-watcher v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

hubot-watcher

hubot-watcher is simple script to monitor hosts availability. It sends HEAD request to each host in list and notifies if status code is not 200.

Installation

In hubot project repo, run:

npm install hubot-watcher --save

Then add hubot-watcher to your external-scripts.json:

[
  "hubot-watcher"
]

Quickstart

Add host to watcher list:

user> watcher add google.com
hubot> Watching google.com(google.com:80/)
user> watcher add example.com
hubot> Watching example.com(example.com:80/)

Check status:

user> watcher status
hubot> Getting statuses
*google.com* is *alive*
*example.com* is fucking *dead* for 1 cycles.

If you tired of manual checking, just enable watcher loop with:

user> watcher loop
hubot> Starting watcher loop

Advanced level

In addition to host you can specify name, port or path:

user> watcher add app1.example.com as example-app1 port 3000 path /status
hubot> Watching example-app1(app1.example.com:3000/status)

You can also set up mentions for failed checks (usefull for slack or hipchat):

user> watcher mention @alice @bob @steve
hubot> Ok, will mention this guys: @alice @bob @steve
hubot> *google.com* is fucking *dead* for 30 cycles. @alice @bob @steve

Contributing

  1. Fork it ( https://github.com/kressh/hubot-watcher/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
0.1.0

8 years ago