Skip to content

Instantly share code, notes, and snippets.

@thanos-irodotou
Last active June 22, 2016 14:41
Show Gist options
  • Save thanos-irodotou/41fb8720ffe078bba8fe5fe6680f6128 to your computer and use it in GitHub Desktop.
Save thanos-irodotou/41fb8720ffe078bba8fe5fe6680f6128 to your computer and use it in GitHub Desktop.
Steps and

####Possible Setups

  1. Run a standalone sensu-client that points to Integration's Sensu Server [Easiest setup]
    • Install your own sensu client on your openstack devserver following the steps here
    • After successfully running all the commands above you'll have to manually configure some parts of the client.
      1. create the configuration file: sudo touch /etc/sensu/config.json & add the following lines in it (with sudo):
      {
        "rabbitmq": {
          "port": 5672,
          "host": "10.2.134.44", // The ip of the openstack server running the sensu backend stack
          "user": "sensu",
          "password": "password",
          "vhost": "/sensu",
          "reconnect_on_error": true
        }
      }
      1. create the client configuration file: sudo touch /etc/sensu/conf.d/client.json & add the following lines (with sudo):
      {
          "client": {
              "name": "ai-devserver", // I suggest you use your server's name here
              "address": "10.2.134.44", // The ip of the openstack server running the sensu backend stack
              "subscriptions": [ "dev" ], // Or just leave empty
              "socket": {
                  "bind": "127.0.0.1",
                  "port": 3030,
                  "safe_mode": false,
                  "keepalive": { }
              }
          }
      }
      1. create the checks & app dirs for application deployed checks: sudo mkdir /etc/sensu/conf.d/checks /etc/sensu/conf.d/app
      2. clone the bw sensu-plugins repo and copy them into /etc/sensu/plugins: git clone [email protected]:BrandwatchLtd/sensu-plugins.git && cd sensu-plugins && sudo cp *(.x) /etc/sensu/plugins/ // if you use zsh
      3. set the sensu_enabled config-db property to true
      4. trigger an application redeploy with ansible
    • Advantages: Our existing checks that run on int/stage/live are automatically copied to /etc/sensu/conf.d/checks/app and no manual check writing is required
    • Known disadvantages: Since this solution hooks a standalone client to Integration's sensu server it uses the same handlers, e.g. metric collection and alerting are affected. This is not the end of the world, it just means more configuration is required to distinguish between apps running on devservers and integration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment