Documentation forAppOptics

Fluentd

Overview

This integration collects metrics from Fluentd. Fluentd is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data.

This integration is currently available for Windows and Linux platforms.

This integration was updated to V2 plugin framework. If you are still using depreciated way of configuring it, please refer to old documentation.

Setup

The fluentd monitoring is accomplished by bridge plugin which is included with the SolarWinds Snap Agent by default. Please follow the directions below to enable it for a agent instance. The bridge plugin utilize Telegraf Fluentd plugin.

Prerequisites

Install Fluentd and open the configuration file td-agent.conf. Add the following code block into the configuration:

Copy
<source>
  @type monitor_agent
  bind 0.0.0.0
  port 24220
</source>

Save your changes and restart the Fluentd agent.

See the monitoring page for more information on configuring the Fluentd agent.

You can check to see if metrics are coming in by running the following command (update the URI as needed):

Copy
$ curl http://host:24220/api/plugins.json
{
  "plugins":[
    {
      "plugin_id":"object:3fec669d6ac4",
      "type":"forward",
      "output_plugin":false,
      "config":{
        "type":"forward"
      }
    },
    {
      "plugin_id":"object:3fec669dfa48",
      "type":"monitor_agent",
      "output_plugin":false,
      "config":{
        "type":"monitor_agent",
        "port":"24220"
      }
    },
    {
      "plugin_id":"object:3fec66aead48",
      "type":"forward",
      "output_plugin":true,
      "buffer_queue_length":0,
      "buffer_total_queued_size":0,
      "retry_count":0,
      "config":{
        "type":"forward",
        "host":"192.168.0.11"
      }
    }
  ]
}

Configuration

The agent provides an example task file to help you get started quickly, but requires you to provide the correct settings for your Fluentd installation. To enable the task:

  1. Make a copy of the fluentd example task file task-bridge-fluentd.yaml.example, renaming it to task-bridge-fluentd.yaml:

    On Windows, using Explorer or PowerShell:

    Copy
    > copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-fluentd.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-fluentd.yaml"

    On Linux using command line:

    Copy
    $ sudo cp /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-fluentd.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-fluentd.yaml
  2. Edit the task file with settings specific to your fluentd install:

    In this configuration you'll notice that it is already configured for localhost. If fluentd is running on another server you will need to edit the task file to reflect the correct endpoint:

    Copy
    ---
    version: 2

    schedule:
      type: cron
      interval: "0 * * * * *"
      
    plugins:
      - plugin_name: bridge
      
        config:
          fluentd:
            ## This task reads information exposed by fluentd (using /api/plugins.json endpoint).
            ##
            ## Endpoint:
            ## - only one URI is allowed
            ## - https is not supported
            endpoint: "http://localhost:24220/api/plugins.json"        
            ## Define which plugins have to be excluded (based on "type" field - e.g. monitor_agent)
            exclude:
              - monitor_agent
              - dummy
              
        publish:
          - plugin_name: publisher-appoptics
  3. Restart the agent:

    On Windows command line:

    Copy
    > net stop swisnapd
    > net start swisnapd

    On Linux command line:

    Copy
    $ sudo service swisnapd restart
  4. Enable the Fluentd plugin

    On the Integrations Page you will see Fluentd available if the previous steps were successful. It may take a couple minutes before the Fluentd plugin is identified. Select the Fluentd plugin to open the configuration menu in the UI, and enable the plugin. If you do not see the plugin, see Troubleshooting Linux.

Testing Integration

To check if and what metrics can be collected with given configuration, run bridge plugin in debug mode:

On Windows command line:

Copy
> "C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-bridge.exe" --debug-mode --plugin-config "{\"fluentd\": {\"endpoint\": \"http://localhost:24220/api/plugins.json\"}}"

On Linux command line:

Copy
$ /opt/SolarWinds/Snap/bin/snap-plugin-collector-bridge --debug-mode --plugin-config "{\"fluentd\": {\"endpoint\": \"http://localhost:24220/api/plugins.json\"}}"

Metrics and Tags

Metrics

The table below outlines the default set of metrics collected by the fluentd plugin.

Namespace Description
fluentd.buffer_queue_length The length of the buffer queue.
fluentd.buffer_total_queued_size How many bytes of data are buffered in Fluentd for a particular output.
fluentd.retry_count How many times Fluentd retried to flush the buffer for a particular output.

Tags

The table below outlines the default set of tags provided for each metric.

Tags Description
plugin_category Category of the plugin
plugin_id ID of the plugin
plugin_type Plugin Type
hostname Name of the host. Instead of using this tag we recommend using the @host alias.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.