Sensu Installation Instructions

How to Integrate Sensu with BigPanda

Create an App Key

First create an App Key. You'll need a separate App Key for each integrated system.

Create a Sensu Handler

In order to send events to BigPanda we need to define a handler for Sensu (more about handlers):

  • Connect to the Sensu server via shell.
  • Please make sure you have all the following libraries installed: ruby, ruby-dev, build-essential.
  • Please make sure you have sensu-plugin gem installed: sudo gem install sensu-plugin.
  • Download the BigPanda handler and its configuration by executing the sudo commands found within the BigPanda Integrations Console
  • Change the script's permissions to allow Sensu to execute it (you might need to replace sensu with the appropriate user):
    sudo chown sensu:sensu /etc/sensu/handlers/bigpanda.rb && sudo chmod 700 /etc/sensu/handlers/bigpanda.rb

Add BigPanda as a Handler

  • Still on the Sensu server, go to the checks configuration directory (default: /etc/sensu/conf.d):

    • For each check, add "bigpanda" to the handlers array. The outcome should look similar to this:

         {
           "checks": {
             "<check_name>": {
               "handlers": ["<handler_1_name>", "<handler_2_name>", ..., "bigpanda"],
                 ...
      
          For example, the cron_check from [sensu documentation](http://sensuapp.org/docs/0.12/adding_a_check) should look like this:  
      
         {
           "checks": {
             "cron_check": {
               "handlers": ["default", "bigpanda"],
               "command": "/etc/sensu/plugins/check-procs.rb -p cron -C 1 ",
               "interval": 60,
               "subscribers": [ "webservers" ]
             }
           }
         }
      
  • Restart the sensu-server service:
    sudo /etc/init.d/sensu-server restart

Success

Next time you have Sensu alerts, you will see them in BigPanda.


Recommended Reading