Community Plugins

The AppOptics Host Agent is based on Intel’s Snap Telemetry Framework an open framework designed to simplify the collection, processing and publishing of system data through a single API. The open plugin model allows for quick and easy loading of community, or proprietary plugins into Snap.

This flexibility allows AppOptics to support many of the Snap plugins available on the open source community. You can find the list of Snap’s open source community plugins on the Plugin Catalog.

Enabling Community Plugins

Enabling community plugins in AppOptics is a straightforward process.

In a nutshell, it can be summarized as follows:

Once the community plugin is enabled, you’ll be able to easily create a custom dashboard.

1. Download/Build Plugin Binary

Snap’s Plugin Catalog provides a list of plugins that can be enabled in AppOptics

Note

For some plugins we have created Integrations where we curate metrics from the plugin and create dashboards on your behalf.

The catalog provides direct download link for many of the plugin binaries. You can download the plugin binary directly from this link.

If the plugin binary is not available for direct download, you will have to build the binary - you’ll typically find the instructions on building the plugin binary from the plugin’s Github repository.

Rename the plugin binary name to following format:

snap-plugin-collector-<plugin-name>

Copy the plugin binary over to /opt/appoptics/bin directory on the host where AppOptics host agent is running.

2. Create Plugin and Task Configuration files

In order to enable and run the plugin in AppOptics, you need to create two configuration files:

  • Task configuration - primarily controls plugin run schedule and metrics it collects.
  • Plugin configuration - contains plugin-specific configurations (i.e. url, username, etc.)

Note

You can typically find a sample task configuration file and plugin configuration file in the plugin’s Github repository

Task Configuration

Create the task configuration file as:

task-<plugin-name>.yaml

Content of the task configuration file will typically be:

---
version: 1
schedule:
  # Run every minute
  type: cron
      interval: "0 * * * * *"
workflow:
  collect:
    metrics:
      /<plugin-provider>/<plugin-name>/*: {}
      config: {}
    publish:
      - plugin_name: publisher-appoptics
      config:
        period: 60
        floor_seconds: 60

Place the Task configuration file under /opt/appoptics/etc/tasks.d directory on the host where the AppOptics host agent is running.

Plugin Configuration

Create the plugin configuration file as:

<plugin-name>.yaml

Content of the plugin configuration file will typically be:

collector:
  <plugin-name>:
    all:
      <plugin-setting-1> : <value-1>
      <plugin-setting-2> : <value-2>
load:
  plugin: snap-plugin-collector-<plugin-name>
  task: task-<plugin-name>.yaml

Note

Under the load configuration section, you’ll reference the plugin binary and task configuration files created earlier

Place the Plugin configuration file under /opt/appoptics/etc/plugins.d directory on the host where the AppOptics host agent is running.

3. Restart the Host Agent Service

Restart the Host Agent service by running the following command:

sudo service appoptics-snapteld restart

This will start running the plugin on the Host Agent.

4. Enable the Plugin

Login to AppOptics and go to the Integrations page. Your plugin should be listed there under the Community Plugins section.

Click on the plugin to expand the details panel and you’ll be able to take following actions:

  1. Enable the plugin - Once enabled, AppOptics will start to collect the metrics from the plugin
  2. Create custom dashboard - Go to the Metrics tab on the plugin details panel where you can select a set of metrics. After selecting a set of metrics, click on Create Dashboard button to quickly create a custom dashboard

Note

Don’t forget to enable the plugin. Metrics will not be received and stored until the plugin has been enabled.

Example

In this example, we’re going to integrate Snap’s Couchbase plugin into AppOptics.

Download the Couchbase plugin binary from its Github repository. A direct download link is also available from Snap’s Plugin Catalog. Copy the plugin binary over to the /opt/appoptics/bin directory on the host where the AppOptics host agent is running.

Note

Make sure that the plugin binary is executable

Create a task-couchbase.yaml file (see below) and copy it over to the /opt/appoptics/etc/tasks.d directory on the host where the AppOptics host agent is running.

---
version: 1
schedule:
  type: "simple"
  interval: "10s"
workflow:
  collect:
    metrics:
      /staples/couchbase/*: {}
    publish:
    - plugin_name: publisher-appoptics
        config:
          period: 60
          floor_seconds: 60

This task configuration is configured to collect all metrics from the plugin by specifying /staples/couchbase/*.

Create a couchbase.yaml file (see below) and copy it over to the /opt/appoptics/etc/plugins.d directory on the host where the AppOptics host agent is running.

collector:
 couchbase:
    all:
      api_url: "http://<couchbase-ip>:8091/pools/default/buckets/"
      username: "<username>"
      password: "<password>"

load:
  plugin: snap-plugin-collector-couchbase
  task: task-couchbase.yaml

Replace <couchbase-ip>, <username>, and <password> with your own values.

Note

Sample configuration files for the Couchbase plugin can be found in its Github repository.

Restart the host agent

sudo service appoptics-snapteld restart

Login to AppOptics. On the home page, look for the Plugins section. You should see the plugin listed there.

couchbase_home

Clicking on the “View All” button will will take you to the Integrations page where you will also see the plugin listed.

couchbase_integrations

Click on the plugin to see the list of metrics:

couchbase_metrics

Caution

For metrics to start flowing the plugin has to be enabled.

Select a set of metrics and click on the “Send Metrics to Dashboard” button to create a custom dashboard.

couchbase_enabled

Enjoy your custom dashboard for the Couchbase plugin.

couchbase_dashboard