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
-
From the Lifecycle Manager side menu, select Config Profiles.
-
Under Config Profile, select dse.yaml.
-
Locate the section for DSE Metrics Collector.
-
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, theinsights_data
directory is stored in the same parent directory as thecommitlog_directory
as defined incassandra.yaml
. The location of thecassandra.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/
-
-
-
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
-
Select the enabled checkbox to enable defining the configuration file.
-
Enter the parameters to define the configuration profile. The required parameters differ depending on whether you are exporting metrics to Graphite, Prometheus, or StatsD.
-
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.
-
-
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
-
-
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
orIP address
to connect to. By default, StatsD will bind to theany
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
-
-
-
Select Save to save the changes to the Config Profile.
-
Run a configure job to propagate the updates to the Config Profile.
-
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