not built with config management tools in mind • ... not built with "cloud" in mind. Server lifecycles can be very short. • ... don't scale well So ... • Sonian, Inc. wrote Sensu to replace their struggling Nagios infrastructure • released as open-source in 2011 (MIT license)
CM friendly (Chef, Puppet, etc) • Simple plugin interface, write them in any language • Re-use Nagios plugins! There are thousands. • Available as Ruby Gem or .. • .. a simple "Omnibus"-style installer (.deb, .rpm)
request ... • ... sensu-client executes check and send results to sensu-server ... • ... sensu-server executes handlers using the output of check requests. • all communication over RabbitMQ
with its own embedded Ruby (1.9) and gems to /opt/sensu. Well-tested package. $ yum install sensu $ apt-get install sensu • Alternative: install via gem $ gem install sensu
Puppet, and Salt and examples available on Github to get you started • All configuration is JSON • Distribute same configs to clients and server • Configs loaded from: ◦ /etc/sensu/config.json ◦ /etc/sensu/conf.d/*.json
of pre-existing code here. • Or, pick and choose from the "sensu-community- plugins" repo on github • Or, write your own. • If you want to use Ruby, install "sensu-plugin" gem and subclass Sensu::Plugin::Check::CLI
Ruby is easiest. • Sensu::Handler class from "sensu-plugin" gem contains a lot of helpful boilerplate. • Handlers receive JSON data on STDIN, Example: https://gist.github.com/1723079