intro to SENSU

A new approach in systems monitoring: an introduction


What's wrong with nagios?

Nagios and descendants come from a different age:
v1.0 ~ March 1999
  • No cloud
  • Configuration management is (almost) unheard of
  • Static environments
  • Much Smaller Scale


  • Public/Private clouds
  • If you are not doing configuration management, you are doing it wrong
  • Dynamic environments
  • Massive scale

How does sensu help?

Built with cloud infrastructures in mind
Designed to be deployed using configuration management
Automatic discovery of hosts
More lightweight than Nagios
Designed to scale if needed

Sensu components

Sensu Server
Sensu API
Sensu Dashboard 
Sensu Client
all in the same binary
External Server Requirements

Sensu client

Sensu is a "Fat" binary - Ruby is self contained
Read checks definitions from RabbitMQ
Executes checks
Returns results in JSON
{"name":"check_load","issued":1374828540,"command":"/etc/sensu/plugins/check-load.rb","executed":1374828540,"command_executed":"/etc/sensu/plugins/check-load.rb","output":"CheckLoad OK: Load average: 1.22, 1.13, 0.92\n","status":0,"duration":0.097}}}

Sensu Server

Runs on one or more machines
Automatic master selection
Publishes check requests to RabbitMQ in JSON
{"timestamp":"2013-07-26T08:58:59.177715+0000","level":"info","message":"publishing check request","payload":{"name":"check_es_heap","issued":1374829139,"command":"/etc/sensu/plugins/check-es-heap.rb -c 240000000 -w 200000000"},"subscribers":["es"]}
Controllable via API

sensu api

Sensu API provides programmatic access to data that servers collect: events and clients.
  • Aggregates
  • Checks
  • Clients
  • Events
  • Health
  • Info
  • Stashes

all in your fingertips!

curl -X DELETE http://<sensu-api>/client/<node>

sensu dashboard

Sensu's web based GUI
Can be heavily customized using API
Unfortunately, it can only receive data from a single datasource (for now ... )

overview I - events

OVERVIEW II - stashes

Overview III - hosts

OVERVIEW IV - checks

but i still like nagios

A design goal of Sensu was to be compatible with Nagios at the checks level
Checks return Nagios compatible exit values
0 - OK               
1 - Warning   
2 - Critical      
3 - Unknown

14 years of Nagios checks development do not go to waste

help! Nagios does not have the check i need!

Sensu checks can be written in any language
For Ruby, there is a gem simplifying things
Check out the community checks repository
Classmarkets has a few custom checks

SENSU HAndlers

A sensu event can be processed by one or more handlers.
Handlers are custom pieces of code that for example can
notify via email, send an SMS, do any custom action you want.

i miss my fancy rrd graphs

Enter check type: "metric"
Passes on arbitrary metric data to "something"
Designed to work with Graphite/Ganglia/etc


Still very new (v 0.9 at time of writing)
Lack of documentation (mailing lists and IRC)
Not as widely tested as Nagios
Effing expensive support plan
"Fat" binary (contains everything)
Some people do not like Ruby

q&A / feedback


By Athanasios Kostopoulos