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, select Config Profiles.
  2. Under Config Profile, select dse.yaml.
    1. Locate the section for DSE Metrics Collector.
    2. Explicitly set the directories where DSE Metrics Collector stores metrics and metrics logs:
      data_dir
      Directory to store collected metrics.

      When data_dir is not explicitly set, the insights_data directory is stored in the same parent directory as the commitlog_directory as defined in cassandra.yaml. If the commitlog_directory uses the package default of /var/lib/cassandra/commitlog, data_dir will default to /var/lib/cassandra/insights_data.

      Default: /var/lib/cassandra/insights_data

      log_dir
      Directory to store logs for collected metrics. The log file is dse-collectd.log. The file with the collectd PID is dse-collectd.pid.

      Default: /var/log/cassandra/

      See Configuring data and log directories for DSE Metrics Collector and DSE Metrics Collector.

  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

    Select Add an item, and then enter the following parameters in the Add nodes window to configure exporting metrics to a Graphite server.
    Note: For descriptions of additional parameters, see the write_graphite plugin documentation on the collectd website.
    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.
    Note: 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. Select Save to save the changes to the Config Profile.
  7. Run a configure job to propagate the updates to the Config Profile.
  8. On one of the DSE nodes, use dsetool insights_config to enable DSE Metrics Collector with local storage:
    dsetool insights_config --mode ENABLED_WITH_LOCAL_STORAGE