The Five Minute Install

Objective

Although Sensu’s architecture is one of its most compelling features, and the complete installation guide can help you get Sensu installed and configured for a variety of operating environments, you might not actually care about any of that until you can get Sensu up and running in a development environment for testing purposes. This installation guide is intended to help you to install Sensu Core in five minutes or less, or we’ll give you your money back, guaranteed.

After completing the steps in this guide, you will have a fully functional Sensu Core installation in a standalone configuration.

Installation Requirements

What will you need to complete this guide?

  • A virtual machine, or physical computer running 64-bit Ubuntu 14.04 with a minimum of 2GB of memory (4GB recommended)
  • Familiarity with a command-line interface
  • Willingness to run a shell script downloaded from the internet (or not)
  • The commitment to count to ten (the number of steps in this guide)
  • 300 seconds (the amount of time it should take to complete this installation)

Ready? Let’s get started!

Install Sensu in 5-minutes or less

The following installation steps will help you get Sensu Core installed in a standalone on a system running Ubuntu 14.04, only. For installation on other platforms, and/or alternative installation configurations, please consult the installation guide.

  1. Install the Sensu software repositories:

    wget https://sensuapp.org/install.sh
    sudo bash install.sh
    sudo apt-get update
    
  2. Install Redis (>= 1.3.14) from the distribution repository:

    sudo apt-get -y install redis-server curl jq
    
  3. Set Redis to start on boot using the update-rc.d utility, and start Redis:

    sudo update-rc.d redis-server enable
    sudo service redis-server start
    
  4. Install Sensu

    sudo apt-get install sensu
    

    …and if you’re using Sensu Enterprise, let’s go ahead and install Sensu Enterprise as well:

    sudo apt-get install sensu-enterprise sensu-enterprise-dashboard
    
  5. Configure Sensu by downloading this example configuration file:

    sudo wget -O /etc/sensu/config.json https://sensuapp.org/docs/0.28/files/simple-sensu-config.json
    

    Alternatively, please copy the following example configuration file contents to /etc/sensu/config.json:

    {
      "redis": {
        "host": "127.0.0.1"
      },
      "transport": {
        "name": "redis"
      },
      "api": {
        "host": "127.0.0.1",
        "port": 4567
      }
    }
    
  6. Configure the Sensu client by downloading this example configuration file:

    sudo wget -O /etc/sensu/conf.d/client.json https://sensuapp.org/docs/0.28/files/simple-client-config.json
    

    Alternatively, please copy the following example configuration file contents to /etc/sensu/conf.d/client.json:

    {
      "client": {
        "name": "client-01",
        "address": "127.0.0.1",
        "environment": "development",
        "subscriptions": [
          "dev"
        ],
        "socket": {
          "bind": "127.0.0.1",
          "port": 3030
        }
      }
    }
    
  7. Configure a Sensu dashboard by downloading this example configuration file:

    sudo wget -O /etc/sensu/dashboard.json https://sensuapp.org/docs/0.28/files/simple-dashboard-config.json
    

    Alternatively, please copy the following example configuration file contents to /etc/sensu/dashboard.json:

    {
      "sensu": [
        {
          "name": "sensu",
          "host": "127.0.0.1",
          "port": 4567
        }
      ],
      "dashboard": {
        "host": "0.0.0.0",
        "port": 3000
      }
    }
    
  8. Make sure that the sensu user owns all of the Sensu configuration files:

    sudo chown -R sensu:sensu /etc/sensu
    
  9. Start the Sensu services

    Sensu Core users:

    sudo service sensu-server start
    sudo service sensu-api start
    sudo service sensu-client start
    

    Sensu Enterprise users:

    sudo service sensu-enterprise start
    sudo service sensu-enterprise-dashboard start
    sudo service sensu-client start
    
  10. Verify that your installation is ready to use by querying the Sensu API using the curl utility (and piping the result to the jq utility):

    curl -s http://127.0.0.1:4567/clients | jq .
    

    If the Sensu API returns a JSON array of Sensu clients similar to this:

    $ curl -s http://127.0.0.1:4567/clients | jq .
    [
      {
        "timestamp": 1458625739,
        "version": "0.28.0",
        "socket": {
          "port": 3030,
          "bind": "127.0.0.1"
        },
        "subscriptions": [
          "dev"
        ],
        "environment": "development",
        "address": "127.0.0.1",
        "name": "client-01"
      }
    ]
    

    …you have successfully installed and configured Sensu!

    If you you’re using Sensu Enterprise, you should also be able to load the Sensu Enterprise Dashboard in your browser by visiting http://hostname:3000 (replacing hostname with the hostname or IP address of the system where the dashboard is installed).

Start your FREE trial today.

Already using Sensu Core? Upgrade to Sensu Enterprise today to take advantage of its enterprise console, added-value features, built-in integrations, FREE annual training, and enterprise-class support.