Sensu on Solaris

Reference documentation

Install Sensu

Sensu Core is installed on Solaris systems via native system installer packages (i.e. .pkg or IPS .p5p files), which are available for download from the Sensu Downloads page, and from these repositories: Solaris 10 (.pkg), and Solaris 11 (IPS .p5p).

Download and install Sensu on Solaris 10

NOTE: As of Sensu version 0.28, 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.

  2. Install the sensu-0.28.0-1.i386.pkg package using the pkgadd utility:

    $ su
    $ pkgadd -d sensu-0.28.0-1.i386.pkg
    
  3. Install the Sensu service init script(s) using the svccfg utility:

    svccfg import /lib/svc/manifest/site/sensu-client.xml
    
  4. 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.

Download and install Sensu on Solaris 11

  1. Download Sensu from the Sensu Downloads page, or by using the wget utility:

    wget https://sensu.global.ssl.fastly.net/solaris/ips/5.11/sensu-0.28.0-1.i386.p5p
    
  2. Install the sensu-0.28.0-1.i386.p5p package using the pkg utility:

    $ sudo pkg install -g sensu-0.28.0-1.i386.p5p developer/versioning/sensu
    
  3. Download and run the Sensu post-install script:

    $ wget https://sensuapp.org/docs/0.28/files/postinst.sh
    $ chmod +x postinst.sh
    $ sudo ./postinst.sh
    

    NOTE: all native system installer packages for Sensu contain this post-install script, which is used for setting up the sensu system user and group, creating various configuration directories, setting configuration directory permissions, and creating service init scripts. This step may will be included in future Solaris 11 packages, however at this time it is necessary to perform these steps manually.

  4. Install the Sensu service init script(s) using the svcadm utility:

    $ sudo svcadm restart manifest-import
    
  5. 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 Solaris systems will load configuration from the following locations:

  • /etc/sensu/config.json
  • /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 /etc/sensu/conf.d

Example client configuration

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

    {
      "client": {
        "name": "solaris-client",
        "address": "127.0.0.1",
        "environment": "development",
        "subscriptions": [
          "dev",
          "solaris-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 /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

Managing the Sensu client process

Manually start, stop, and restart the Sensu services using the svcadm utility:

$ svcadm enable sensu-client
$ svcadm disable sensu-client
$ svcadm restart sensu-client

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.