Exporting metrics collection

About this task

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.

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. 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

          If the commitlog_directory uses the package default of /var/lib/cassandra/commitlog, data_dir defaults 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/

  3. Under Config Profile, select the configuration file to define.

    Configuration Files
    Configuration file Monitoring 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.

      For descriptions of additional parameters, see the write_graphite plugin documentation on the collectd website.

      • node-name

        Name of the node from which to export metrics to the Graphite server.

      • host

        Hostname or IP address to which to connect.

        Default: localhost

      • port

        Port number to which to connect.

        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 connection 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 on whch the embedded webserver listens.

        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. 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

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com