Configure metrics exports using LCM
In DataStax Enterprise (DSE) versions that include DSE Metrics Collector, it is enabled by default to aggregate DSE metrics and integrate with existing monitoring solutions.
In your Lifecycle Manager (LCM) configuration profiles, you can configure integrations with Prometheus, StatsD, and Graphite to export DSE Metrics Collector data. Because DSE Metrics Collector is built on collectd, the parameters for each monitoring tool depend on the collectd plugin.
For clusters that aren’t managed by LCM, see the DSE Metrics Collector documentation to configure the collection and exporting of metrics to a supported monitoring tool.
-
In the list of configuration files, select dse.yaml.
-
In the DSE Metrics Collector section, explicitly set the directories where DSE Metrics Collector stores metrics and metrics logs:
-
data_dir: Directory to store collected metrics. When
data_diris not explicitly set, theinsights_datadirectory is stored in the same parent directory as thecommitlog_directorydefined incassandra.yaml. If thecommitlog_directoryuses the package default of/var/lib/cassandra/commitlog, thendata_dirdefaults to/var/lib/cassandra/insights_data. -
log_dir: Directory to store logs for collected metrics. The default is
/var/log/cassandra/.
The DSE Metrics Collector log file is named
dse-collectd.log, and the file containing the collectd PID is nameddse-collectd.pid. -
-
Select the configuration file for your monitoring tool:
-
Prometheus: 10-write-prom.conf
-
StatsD: 10-statsd.conf
-
Graphite: 10-write-graphite.conf
-
-
Select enabled to allow editing, and then configure the parameters for your monitoring tool integration:
- Prometheus
-
Enter the following parameters to export metrics to a Prometheus server. For additional parameters, see the collectd
write_prometheusplugin documentation.-
port: Port on which the embedded webserver listens. The default is
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. The default in Prometheus and LCM is
300(5 minutes).
-
- StatsD
-
Enter the following parameters to export metrics to a StatsD network daemon. For additional parameters, see the collectd
statsdplugin documentation.-
host: The hostname or IP address to connect to. By default, StatsD binds to the
anyaddress, which accepts packets sent to any of the host addresses. -
port: The UDP port to listen on, which can be either a service name or a port number. The default is
8125.
-
- Graphite
-
Select Add an item, and then enter the following parameters in the Add nodes window to export metrics to a Graphite server. For additional parameters, see the collectd
write_graphiteplugin documentation.-
node-name: Name of the node from which to export metrics to the Graphite server.
-
host: Hostname or IP address to which to connect. The default is
localhost. -
port: Connection port. The default is
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. The default is
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 the UDP protocol.
-
-
Click Save.
-
Run a configure job to apply the changes.
-
On a DSE node, run
dsetool insights_configto enable DSE Metrics Collector with local storage:dsetool insights_config --mode ENABLED_WITH_LOCAL_STORAGE -
For troubleshooting, you can export Insights diagnostics data.