Installing Sensu Plugins

Sensu’s functionality can be extended through the use of plugins. Plugins can provide executables for performing status or metric checks, mutators for changing data to a desired format, or handlers for performing an action on a Sensu event.

Installing plugins using assets

Assets are shareable, reusable packages that make it easy to deploy Sensu plugins. To get started using and deploying assets, we recommend starting with this guide on installing assets. It has everything you need to familiarize yourself with workflows involving assets.

Using the Bonsai Asset Index

Sensu’s Bonsai Asset Index provides a centralized place for downloading and sharing plugin assets. If you ever need to find an asset, this is the first to stop. There, you’ll find plugins, libraries and runtimes you need to automate your monitoring workflows. If you’d like to share your asset on Bonsai, we recommend reading this guide on sharing your asset.

Installing plugins using the sensu-install tool

If you’ve used previous versions of Sensu, you’ll be familiar with the Sensu Plugins organization on GitHub. While some of these plugins are Sensu Go-enabled, not all of them contain the components necessary to work with Sensu Go. See individual plugin instructions for information about compatibility with Sensu Go.

NOTE: Plugins found in the Sensu Plugins GitHub organization are community-maintained, meaning that anyone can improve on a plugin found there. If you have a question about how you can get involved in adding to, or providing a plugin, head to the Sensu Community Slack channel. Maintainers are always happy to help answer questions and point you in the right direction.

To use community plugins that are not yet Sensu Go-enabled, you’ll need to use the sensu-install tool. This tool comes with an embedded version of Ruby, so there’s no need for Ruby to be installed on your system.

To install a Sensu Community Plugin with Sensu Go:

  1. Install the sensu-plugins-ruby package from packagecloud.

  2. Use the sensu-install command to install any plugins in the Sensu Plugins organization on GitHub by repository name. Plugins are installed into /opt/sensu-plugins-ruby/embedded/bin.

sensu-install --help
Usage: sensu-install [options]
    -h, --help                       Display this message
    -v, --verbose                    Enable verbose logging
    -p, --plugin PLUGIN              Install a Sensu PLUGIN
    -P, --plugins PLUGIN[,PLUGIN]    PLUGIN or comma-delimited list of Sensu plugins to install
    -e, --extension EXTENSION        Install a Sensu EXTENSION
    -E, --extensions EXTENSION[,EXT] EXTENSION or comma-delimited list of Sensu extensions to install
    -s, --source SOURCE              Install Sensu plugins and extensions from a custom SOURCE
    -c, --clean                      Clean up (remove) other installed versions of the plugin(s) and/or extension(s)
    -x, --proxy PROXY                Install Sensu plugins and extensions via a PROXY URL

For example, to install the Sensu InfluxDB Plugin:

sudo sensu-install -p influxdb

To install a specific version of the Sensu InfluxDB Plugin with sensu-install, run:

sudo sensu-install -p 'sensu-plugins-influxdb:2.0.0'

We strongly recommend using a configuration management tool or using Sensu assets to pin the versions of any plugins installed in production.

NOTE: If a plugin is not Sensu Go-enabled and there is not analog on Bonsai, it is possible to add the necessary functionality. This guide on [discourse.sensu.io] will walk you through that process.

Troubleshooting the sensu-install tool

Some plugins, such as the Sensu Disk Checks Plugin, require additional tools to install successfully. Depending on the plugin, you may need to install developer tool packages.

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install build-essential

RHEL/CentOS:

sudo yum update
sudo yum groupinstall "Development Tools"