Configuring DSE Metrics Collector

DataStax Enterprise (DSE) Metrics Collector configuration includes tuning time intervals for when metrics are collected, configuration changes are refreshed, setting the reporting period, and defining directory sizes and locations to store metrics and metrics logs.

DataStax Enterprise (DSE) Metrics Collector configuration includes tuning:
  • Time interval of metrics collection
  • Time interval to refresh configuration changes
  • Time interval of node system information collection
  • Maximum size of the local data directory
  • The directories where DSE Metrics Collector stores metrics and metrics logs.

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

dse.yaml

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

Procedure

  1. Ensure that the DSE Metrics Collector is enabled.
  2. To configure metrics collection, use the dsetool insights_config command with the applicable option to adjust:
    • Interval of metrics collection
    • Interval to refresh configuration changes
    • Maximum size of the local data directory
    • Node system information reporting period
    See configuration examples for instructions to modify specific configurations.
  3. Define 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 cannot exceed 2 GB.
    1. To make changes, uncomment the insights_options section in dse.yaml and the options under that heading:
      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.

    2. Restart the node for DSE to recognize the directory changes.

DSE Metrics Collector configuration examples

These configuration examples show how to:
  • View the current configuration
  • Enable and disable metrics collection
  • Adjust the interval of metrics collection
  • Adjust the interval to refresh configuration changes
  • Set the maximum size of the local data directory (2 GB limit)
  • Adjust the node system information reporting period

Examples

To view the current DSE Metrics Collector configuration

dsetool insights_config --show_config
The results of the default configuration:
{
  "mode" : "DISABLED",
  "config_refresh_interval_in_seconds" : 30,
  "metric_sampling_interval_in_seconds" : 30,
  "data_dir_max_size_in_mb" : 1024,
  "node_system_info_report_period" : "PT1H"
}

To enable metrics collection when collectd is configured to report to a real-time monitoring system

dsetool insights_config --mode ENABLED_NO_STORAGE

To enable metrics collection with local storage

dsetool insights_config --mode ENABLED_WITH_LOCAL_STORAGE

To configure 1500 MB for the DSE Metrics Collector local data directory

dsetool insights_config --data_dir_max_size_in_mb 1500
Note: The maximum size of the local data directory must not exceed 2 GB.

To change the node system reporting duration to 1 week

Use a ISO-8601 time duration string.

dsetool insights_config --node_system_info_report_period P1W

To disable metrics collection

dsetool insights_config --mode DISABLED

To configure the metric sampling interval for 60 seconds

dsetool insights_config --metric_sampling_interval_in_seconds 60

To configure 120 seconds for the configuration refresh interval

Push configuration changes to all nodes in the cluster every 2 minutes:

dsetool insights_config --config_refresh_interval_in_seconds 120