Eye::Hipchat
Sends info about process crashes to hipchat room.
Installation
Add this line to your application's Gemfile:
gem 'eye'
gem 'eye-hipchat'
And then execute:
$ bundle
Or install it yourself as:
$ gem install eye-hipchat
Usage
this is an example configuration file
# Notify example
require 'eye/notify/hipchat'
Eye.config do
hipchat token: 'hipchat_v1_token', message: '<strong>#name#</strong> (#pid#) on #host# #message# at #time#.'
contact :dev, :hipchat, 'test'
logger '/tmp/eye.log'
end
Eye.application 'test' do
notify :dev, :debug
stdall '/tmp/eye-example.log'
process :some_process do
notify :dev, :debug
start_command 'sleep 120'
daemonize true
pid_file '/tmp/sleep.pid'
end
end
Configuration
add
hipchatline toEye.configsection and check following parameterstoken- required - v1/v2 tokenapi- use v1 (default) or v2name- who is reporting to hipchat, Eye Bot as a defaultcolor- yellow is default. You can choose from gray, green, purple, red, yellow or randomnotify_all- notify everyone in the room. Default is falseformat- format of the message. Eitherhtmlortext. Default is htmlmessage- message to be sent, default is<strong>#name#</strong> on #host# #message# at #time#.
messagehas following variables (variable must be enclosed to ##)time- human readable time of the eventhost- hostnamemessage- full messagename- name of processfull_name- full process name (like group::process)pid- process IDlevel- message info level
Contributing
- Fork it ( https://github.com/[my-github-username]/eye-hipchat/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