Configuring the data and log directories for DSE Metrics Collector

Configure the directories where DSE Metrics Collector stores metrics and logs.

You can change the directories where DSE Metrics Collector stores metrics and logs.

The default directories for DSE Metrics Collector are:
  • /var/lib/cassandra/insights_data
  • /var/log/cassandra/

dse.yaml

The location of the dse.yaml file depends on the type of installation:

Package installations
Installer-Services installations

/etc/dse/dse.yaml

Tarball installations
Installer-No Services installations

installation_location/resources/dse/conf/dse.yaml

cassandra.yaml

The location of the cassandra.yaml file depends on the type of installation:

Package installations
Installer-Services installations

/etc/dse/cassandra/cassandra.yaml

Tarball installations
Installer-No Services installations

installation_location/resources/cassandra/conf/cassandra.yaml

Procedure

  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/
    insights_options
    Options for DSE Metrics Collector.
    data_dir
    User-defined directory to store collected metrics. When not set and when the default location of the commitlog directory is not changed, the default directory is /var/lib/cassandra/insights_data.
    log_dir
    Directory to store logs for collected metrics. The log file is dse-collectd.log and the file with the collectd PID is dse-collectd.pid. When not set, the default directory is /var/log/cassandra/.
  2. To change the location of the data directory for local storage, adjust the file path in data_dir.

    When metrics collection is enabled with local storage, DataStax recommends explicitly setting data_dir to the DSE Metrics Collector local data directory.

    Note: 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.
  3. To change the limit on how much DSE Metrics Collector data will be stored on disk, set --data_dir_max_size_in_mb with the dsetool insights_config command. The default size of the data directory is 1 GB. The maximum size of the data directory must not exceed 2 GB.
    For example, to configure 1.5 GB maximum size for the local storage data directory:
    dsetool insights_config --data_dir_max_size_in_mb 1500
  4. To change the location of the log directory, adjust the file path in log_dir.
  5. After you make configuration changes with dsetool insights_config, you must disable and then re-enable DSE Metrics Collector to read the configuration file again.