Telegraf

Telegraf is an agent for collecting, processing, aggregating, and writing metrics. The Cinnamon integration with Telegraf and the StatsD input plugin can be used to integrate with the popular time-series database InfluxDB.

Cinnamon dependency

Cinnamon provides an easy-to-get-started plugin that contains all settings required for pushing Lightbend related metrics via Telegraf.

To get started simply add the cinnamonTelegraf dependency:

sbt
Cinnamon.library.cinnamonTelegraf
Maven
<dependency>
    <groupId>com.lightbend.cinnamon</groupId>
    <artifactId>cinnamon-telegraf_2.12</artifactId>
    <version>2.10.0</version>
</dependency>
Gradle
compile group: 'com.lightbend.cinnamon', name: 'cinnamon-telegraf_2.12', version: '2.10.0'

The Cinnamon Telegraf reporter provides a configured StatsD reporter. The default values can be overridden should you want to change the default behavior.

Required
cinnamon.chmetrics {
  reporters += telegraf-reporter
}
Example
cinnamon.chmetrics {
  reporters += telegraf-reporter

  telegraf-reporter {
    host = "127.0.0.1"
    port = 8125
    frequency = 60s

    report {
      histogram = ["p50", "p98", "p99", "max"]
    }
  }
}
Telegraf Reference
cinnamon.chmetrics {
  telegraf-reporter = ${cinnamon.chmetrics.statsd-reporter} {
    telegraf {
      enabled = on
    }
  }
}

Note: These settings are defined in the reference.conf. You only need to specify any of these settings when you want to override the defaults.

StatsD Reference
cinnamon.chmetrics {
  statsd-reporter {

    # StatsD host.
    host = "127.0.0.1"

    # StatsD port.
    port = 8125

    # Frequency of metric reporting to StatsD.
    frequency = 10s

    # Prefix for all metric keys.
    prefix = ""

    # Suffix for all metric keys.
    suffix = ""

    # Whether to enable detailed debug logging for the StatsD reporter
    # Note: only use for troubleshooting as every packet send is logged
    debug = off

    report {
      # Histogram fields to report for metrics
      histogram = ["max", "min", "mean", "median", "stddev", "p75", "p95", "p98", "p99", "p999"]

      # Meter fields to report for metrics
      meter = ["samples", "min1_rate", "min5_rate", "min15_rate", "mean_rate"]
    }

    dogstatsd {
      # Whether DogStatsD format should be used
      enabled = off

      # Prefix for all metric keys, when DogStatsD is enabled
      prefix = ${cinnamon.chmetrics.statsd-reporter.prefix}

      # Suffix for all metric keys, when DogStatsD is enabled
      suffix = ${cinnamon.chmetrics.statsd-reporter.suffix}

      # Tags for all metrics, when DogStatsD is enabled.
      # Uses a "key-value" approach to generate the tags.
      # E.g. the following configuration:
      # tags {
      #   country = "UK"
      # }
      # will generate this Datadog tag: "country:UK"
      tags {}

      # Whether to include "unique dimensions" as tags.
      # These are tags that are unique to this reporter,
      # such as host name and application identifier.
      # Off by default for compatibility with earlier versions.
      # Note: host tag is also already provided by DogStatsD
      unique-dimensions = off
    }

    telegraf {
      # Whether Telegraf format should be used or not
      enabled = off

      # Prefix for all metric keys, when Telegraf is enabled
      prefix = ${cinnamon.chmetrics.statsd-reporter.prefix}

      # Suffix for all metric keys, when Telegraf is enabled
      suffix = ${cinnamon.chmetrics.statsd-reporter.suffix}

      # Tags for all metrics, when Telegraf is enabled.
      # Uses a "key-value" approach to generate the tags.
      # E.g. the following configuration:
      # tags {
      #   country = "UK"
      # }
      # will generate this Telegraf tag: "country=UK"
      tags {}

      # Whether to include "unique dimensions" as tags.
      # These are tags that are unique to this reporter,
      # such as host name and application identifier.
      # Off by default for compatibility with earlier versions.
      unique-dimensions = off
    }
  }
}

Note: These settings are defined in the reference.conf. You only need to specify any of these settings when you want to override the defaults.