Enabling Volume Metric Collection

Describes how to enable metric collection for a volume, and gather volume statistics.

About this task

On all new installations, this feature is enabled by default and you only need to enable metrics collection for each volume. If you are upgrading from a version prior to MapR version 6.0, to start collecting volume metrics that you can then visualize in Grafana, you must enable the metrics collection feature and then enable metrics collection for each volume.

You can enable metrics collection from the command-line and using the Control System.

Enabling the Metric Collection Feature

Procedure

Enable the feature by running the following command:
/opt/mapr/bin/maprcli cluster feature enable -name mfs.feature.metrics.support

Enabling Metric Collection for New Volumes Using the Control System

Procedure

  1. Log in to the Control System and click Data > Volumes.
    NOTE
    The Volumes page is under the Volumes menu in the Kubernetes version of the Control System.
  2. Click Create Volume to display the Create New Volume page.
  3. Enter values for the required settings and move the slider for Collect Metrics to Yes to enable metric collection for the volume.
    For more information, see Creating a Volume.
  4. Click Create Volume to create the volume.

Enabling Metric Collection for Existing Volumes Using the Control System

Procedure

  1. Log in to the Control System and click Data > Volumes.
    NOTE
    The Volumes page is under the Volumes menu in the Kubernetes version of the Control System.
  2. Select the Volumes to edit and Edit Volume from the Actions drop-down menu or go the volume info page and click Edit Volume.
  3. Move the slider for Collect Metrics to Yes to enable metric collection for the volume.
    For more information, see Creating a Volume.
  4. Click Save Changes for the changes to take effect.

Enabling Metric Collection for Volumes Using the CLI

Procedure

Enable metrics collection on:
  • A new volume by running the following command:
    /opt/mapr/bin/maprcli volume create -name <volume-name> -path <volume-mount-path> -type <volume-type> -metricsenabled true
    For more information, see volume create.
  • An existing volume by running the following command:
    /opt/mapr/bin/maprcli volume modify -name <volume-name> -metricsenabled true
    For more information, see volume modify.
  • All volumes that do not have mapr in the name by running the following script:
    for i in `/opt/mapr/bin/maprcli volume list -columns n | grep -v mapr | grep -v volumename`; do echo $i; /opt/mapr/bin/maprcli volume modify -name $i -metricsenabled true; done