Exporting metrics collection

Export metrics from DSE Metrics Collector to a supported monitoring tool.

In DataStax Enterprise (DSE) 6.7 and later, DSE Metrics Collector is enabled by default to aggregate DSE metrics and integrate with existing monitoring solutions to facilitate problem resolution and remediation.

Using Lifecycle Manager (LCM), you can configure exporting metrics from DSE Metrics Collector to a supported monitoring tool. LCM supports defining configuration files for exporting metrics to Prometheus, Graphite, and StatsD. Because DSE Metrics Collector is built on collectd, the parameters for each monitoring tool depend on the collectd plugin.

For clusters not managed by LCM, see the DSE Metrics Collector documentation to configure metrics collection and exporting to a supported monitoring tool.

cassandra.yaml

The location of the cassandra.yaml file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra.yaml
Tarball installations installation_location/resources/cassandra/conf/cassandra.yaml

Prerequisites

Add a configuration profile to define the configuration for DSE clusters.

Procedure

  1. From the Lifecycle Manager side menu, click Config Profiles.
  2. Under Config Profile, select dse.yaml.
    1. Locate the section for DSE Metrics Collector.
    2. Change the directories where DSE Metrics Collector stores metrics and metrics logs.
      Important: DataStax recommends explicitly setting the location of the DSE Metrics Collector data directory. The maximum size of the local data directory must not exceed 2 GB.
      insights_options:
          data_dir: /var/lib/cassandra/insights_data
          log_dir: /var/log/cassandra/

      When data_dir is not set, the default location of the /insights_data directory is the same location as the /commitlog directory, as defined with the commitlog_directory property in cassandra.yaml. The default location of the commitlog directory is /var/lib/cassandra/commitlog.

  3. Under Config Profile, select the configuration file to define.
    Configuration fileMonitoring tool
    10-write-graphite Graphite
    10-write-prom.conf Prometheus
    10-statsd.conf StatsD
  4. Select the enabled checkbox to enable defining the configuration file.
  5. Enter the parameters to define the configuration profile. The required parameters differ depending on whether you are exporting metrics to Graphite, Prometheus, or StatsD.

    Graphite

    Click Add an item, and then enter the following parameters in the Add nodes window to configure exporting metrics to a Graphite server. For descriptions of additional parameters, see the write_graphite plugin documentation on the collectd website.

    After defining the configuration profile, click Save.

    node-name
    Name of the node to export metrics from to the Graphite server.
    host
    Hostname or IP address to connect to.

    Default: localhost.

    port
    Port number to connect to.

    Default: 2003.

    reconnect-interval
    When set to non-zero, forces the connection to the Graphite backend to reconnect periodically. This behavior is desirable when the connection to the Graphite backend is done through load balancers. When set to zero, the connetion is kept open for as long as possible.
    protocol
    Protocol to use when connecting to Graphite.

    Default: tcp.

    log-send-errors
    If selected, logs errors when sending data to Graphite. If not selected, errors are not logged. Enabling error logging is useful when using Protocol UDP.

    Prometheus

    Enter the following parameters to configure exporting metrics to a Prometheus server. For descriptions of additional parameters, see the write_graphite plugin documentation on the collectd website.

    port
    Port that the embedded webserver listens on.

    Default: 9103.

    staleness-delta
    Time (in seconds) after which Prometheus considers a metric stale because no updates occurred in the specified period. This value must match the setting in Prometheus, which defaults to 300 seconds (5 minutes).

    Default: 300

    StatsD

    Enter the following parameters to configure exporting metrics to a StatsD network daemon. For descriptions of additional parameters, see the statsd plugin documentation on the collectd website.

    host
    Hostname or IP address to connect to. By default, StatsD will bind to the any address, which accepts packets sent to any of the host addresses.
    port
    UDP port to listen to, which can be either a service name or a port number.

    Default: 8125

  6. Click Save to save the changes to the Config Profile.
  7. Run a configure job to propagate the updates to the Config Profile.
  8. Restart DSE on the node to propagate the directory changes.