Collecting Volume Metrics

Describes how to enable and collect operational metrics for volumes.

You can collect the following volume metrics on filesystem after you enable metrics collection as described in Enabling Volume Metric Collection:

Read I/Os Number of reads
Write I/Os Number of writes
Read throughput Amount of data read
Write throughput Amount of data written
Read latency Time taken by read operations
Write latency Time taken by write operations

If you enable metrics collection on a volume, for each filesystem instance, on every node where the volume containers reside, metrics for the volume (for a day) are captured every 10 seconds and logged to files in a local volume, which is two way replicated. The metrics log file, Metrics.log-<date>-<n>.json, is available at /var/mapr/local/<hostname>/audit/<mfs-port> directory. Here:

Each record in the file looks similar to the following:

{
 "ts":1503048590000,
  "vid":35211529,
  "RDT":0.0,
  "RDL":0.0,
  "RDO":0.0,
  "WRT":308085.8,
  "WRL":2434.0,
  "WRO":2192.0
}

Here:

The collectd service reads up to 16 MB of data every ten seconds from each file, then aggregates and writes one minute worth of data to OpenTSDB. When reading the file, the collectd service stores offsets (as to how much has been read) as extended attributes (trusted.disptachedOffset) on the file. In addition to the default tags assigned to each metric when collectd writes metrics to OpenTSDB, the following tags are assigned to volume metrics:

For more information on the default tags, see Metric Collection.

For each metrics file, MapR also creates a file, Vollist_metrics.log-<date>-<n>, in the /var/mapr/local/<hostname>/audit/<mfs-port>/ directory. This file is purged based on the CLDB audit log retention period, which is 30 days by default. This file contains a comma separated list of volume name and volume ID (for volumes for which metrics are captured) and is associated with the Metrics.log-<date><n>.json file. For example, the record in the file looks similar to the following:

<volumeid>,<volume name>,<volumeid>,<volume name>,...

You can visualize the metrics in the dashboards on Grafana. See Metric Visualization for more information.