Send bluepill events(passive checks) to gearman server via send gearman
Add this line to your application's Gemfile:
gem 'bluepill-gearman',
And then execute:
$ bundle
Or install it yourself as:
$ gem install bluepill-gearman
Require the bluepill-gearman gem and add a check named :send_gearman in your pill configuration file.
Available options are:
- gearman_server: the Gearman Server. mandatory
- gearman_port: the gearman server port or default to 4730
- host: the host defined in nagios to be hosting the service (default: hostname -f)
- service: the service declared in nagios (default: the bluepill process name)
- queue: default queue is 'check_results'
- key: provide a key for encryption (minimum 8 bytes)
- encryption: default to false, set to true to enable - must provide a key
add :notify_on => :unmonitored to make bluepill send notification when unmonitored
Example:
require 'bluepill-gearman'
Bluepill.application("test") do |app|
app.process("test") do |process|
process.start_command = "bundle exec ./test.rb"
process.pid_file = "/var/run/test.pid"
process.daemonize = true
process.checks :send_gearman, :gearman_server => 'my.gearman.server', :host => 'host_in_nagios', :service => 'passive check service name', :notify_on => :unmonitored
end
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request