Developer Automation Tools Bootcamp

Learning about development tools and automation

View project onGitHub

Introduction to Sensu

"Sensu intends to provide an open framework for building comprehensive monitoring solutions, without imposing restrictions or being overly opinionated." Sensu is an open source project that is watched over by Sean Porter and the team at Heavy Water Ops.

Why Sensu?

There are lots of tools in the monitoring space.

So why pick Sensu? Because those SaaS solutions have external dependencies on publishing agent data to them.

Sensu can run on your network, keeping your data to yourself, live behind a firewall, and not rack up monthly charges to the SaaS provider. Plus, you can run it all locally on a laptop for testing and validation.

Installing Sensu

Sensu is a Ruby app/gem. It runs on Linux and Windows. It has a dependency on RabbitMQ and Redis for the server components. As such, there is a Chef cookbook or Puppet module to install Sensu and get all dependencies installed as well.

Alternatively, you can just use a Docker container with Sensu installed, like arcus/sensu.

Extending Sensu

What makes Jenkins great?
What also makes Sensu great?

THE PLUGINS! - or more specifically - the plugins.

What is even better? Sensu has been developed from the start to use all the Nagios monitors you've probably got laying around. So don't waste the effort it took to develop them. Just use them on a nicer platform!


We are going to complete the following actions with Sensu

  1. Get in the sensu directory of our app and vagrant up our trusty VM
  2. Start up a Sensu server using a Docker container. docker run -d -p 8090:8080 -p 4567:4567 arcus/sensu
  3. Install the Sensu package on the VM (which is running Ubuntu) so it will become a Sensu Agent.
  4. Enable and start the Agent as a service on the VM.
  5. Start up Jenkins on the VM, same as how you did before.
  6. Get the check-jenkins.rb from the Jenkins plugins for Sensu
  7. Install it as a Sensu Check on the VM
  8. View the Sensu Dashboard
  9. Stop Jenkins ctrl-c and watch the Sensu Dashboard again