hubot-watcher
v0.1.0
Published
Hubot will watch for servers if you'll ask gently
Downloads
1
Maintainers
Readme
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
- Fork it ( https://github.com/kressh/hubot-watcher/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request