Sensu on FreeBSD

Reference documentation

Install Sensu Core

Sensu Core is installed on FreeBSD systems via a native system installer package (i.e. a .txz file), which is available for download from the Sensu Downloads page, and from this repository (64-bit FreeBSD 10+ only).

WARNING: FreeBSD packages are currently as a “beta” release. Support for running Sensu on FreeBSD will be provided on a best-effort basis until further notice.

Download and install Sensu using the Sensu Universal .txz file

NOTE: As of Sensu version 0.29 package repository URLs have changed. To install or upgrade to the latest version of Sensu, please ensure you have updated existing configurations to follow the repository URL format specified below.

  1. Download Sensu from the Sensu Downloads page.

    NOTE: FreeBSD packages are available for FreeBSD 10 and 11. Please visit the Sensu Downloads page for more information.

  2. Install the sensu-0.29.0_1.txz package using the pkg utility:

    sudo pkg add ./sensu-0.29.0_1.txz
    
  3. Configure the Sensu client. No “default” configuration is provided with Sensu, so the Sensu client will not run without the corresponding configuration. Please refer to the “Configure Sensu” section (below), for more information on configuring Sensu. At minimum, the Sensu client will need a working transport definition and client definition.

Configure Sensu

By default, all of the Sensu services on FreeBSD systems will load configuration from the following locations:

  • /usr/local/etc/sensu/config.json
  • /usr/local/etc/sensu/conf.d/

NOTE: additional or alternative configuration file and directory locations may be used by modifying Sensu’s service configuration and/or by starting the Sensu services with the corresponding CLI arguments. For more information, please consult the Sensu Configuration reference documentation.

Create the Sensu configuration directory

In some cases, the default Sensu configuration directory (i.e. /etc/sensu/conf.d/) is not created by the Sensu installer, in which case it is necessary to create this directory manually.

mkdir /usr/local/etc/sensu/conf.d

Example client configuration

  1. Copy the following contents to a configuration file located at /usr/local/etc/sensu/conf.d/client.json:

    {
      "client": {
        "name": "freebsd-client",
        "address": "127.0.0.1",
        "environment": "development",
        "subscriptions": [
          "dev",
          "freebsd-hosts"
        ],
        "socket": {
          "bind": "127.0.0.1",
          "port": 3030
        }
      }
    }
    

Example Transport Configuration

At minimum, the Sensu client process requires configuration to tell it how to connect to the configured Sensu Transport.

  1. Copy the following contents to a configuration file located at /usr/local/etc/sensu/conf.d/transport.json:

    {
      "transport": {
        "name": "rabbitmq",
        "reconnect_on_error": true
      }
    }
    

    NOTE: if you are using Redis as your transport, please use "name": "redis" for your transport configuration. For more information, please visit the transport definition specification.

  2. Please refer to the configuration instructions for the corresponding transport for configuration file examples (see Redis, or RabbitMQ reference documentation).

Operating Sensu

Coming soon…

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.