StatPerf Collector¶
StatPerf collects performance metrics from ONTAP by invoking the ONTAP CLI statistics command via the private Rest CLI. The full ONTAP CLI command used is:
statistics show -raw -object $object
This collector is designed for performance metrics collection in environments where the ZapiPerf/RestPerf/KeyPerf collectors can not be used.
Note: The StatPerf collector requires additional ONTAP permissions. Please refer to the StatPerf Collector Permissions section for details.
Metrics¶
StatPerf metrics are calculated similar to those in ZapiPerf. For details on how performance metrics are processed and calculated, please refer to the ZapiPerf Metrics Documentation.
Parameters¶
The parameters for the StatPerf collector are distributed across three files:
- Harvest configuration file (default:
harvest.yml
) - StatPerf configuration file (default:
conf/statperf/default.yaml
) - Object configuration file (located in
conf/statperf/$version/
)
Except for addr
, datacenter
and auth_style
, all other parameters of the StatPerf collector can be defined in either the Harvest configuration, the main StatPerf configuration file, or the object configuration files. Lower-level file definitions override higher-level ones. This enables configuring objects on an individual basis or applying common settings across all objects.
StatPerf Configuration File¶
The StatPerf configuration file (also known as the "template") includes a list of objects to collect and their corresponding configuration file names. Additionally, it defines parameters applied as defaults to all objects. As with RestPerf, parameters defined in lower-level files (object or Harvest configuration files) will override the ones provided here.
Parameter | Type | Description | Default |
---|---|---|---|
use_insecure_tls |
bool, optional | Skip verifying the TLS certificate of the target system. | false |
client_timeout |
duration (Go-syntax) | Maximum time to wait for server responses. | 30s |
latency_io_reqd |
int, optional | Threshold of IOPs for calculating latency metrics; latencies based on very few IOPs are unreliable. | 10 |
jitter |
duration (Go-syntax), optional | Randomly delay collector startup by up to the specified duration to prevent simultaneous REST queries during startup. For example, a jitter value of 1m will delay startup by a random duration between 0 seconds and 60 seconds. For more details, see this discussion. |
|
schedule |
list, required | Specifies the polling frequencies, which must include exactly these three elements in the exact specified order: | |
- counter |
duration (Go-syntax) | Poll frequency for updating the counter metadata cache. | 24 hours |
- instance |
duration (Go-syntax) | Poll frequency for updating the instance cache. | 10 minutes |
- data |
duration (Go-syntax) | Poll frequency for updating the data cache. Note that while Harvest allows sub-second poll intervals (e.g. 1ms ), factors such as API response times and system load should be considered. In short intervals, performance counters may not be aggregated accurately, potentially leading to a failed state in the collector if the poll interval is less than client_timeout . Additionally, very short intervals may cause heavier loads on the ONTAP system and lead to less meaningful metric values (e.g. for latencies). |
1 minute |
The template should list objects in the objects
section. For example:
objects:
Flexcache: flexcache.yaml
Each object is defined by the filename of its configuration file. The file is located in the subdirectory corresponding to the ONTAP version (e.g., conf/statperf/$version/
). At runtime, StatPerf selects the object configuration file that best matches the ONTAP system version. In case of mismatches, StatPerf will still fetch and validate counter metadata from the system.
Object Configuration File¶
The object configuration file allows users to specify object-level parameters for StatPerf. It follows the same concept as other collectors and includes details such as instances, counters, and export options.
For further details, please refer to the guiding documentation below:
Template Example¶
name: FlexCache
query: flexcache_per_volume
object: flexcache
counters:
- ^^instance_name => volume
- ^^instance_uuid => svm
- blocks_requested_from_client
- blocks_retrieved_from_origin
- evict_rw_cache_skipped_reason_disconnected
- evict_skipped_reason_config_noent
- evict_skipped_reason_disconnected
- evict_skipped_reason_offline
- invalidate_skipped_reason_config_noent
- invalidate_skipped_reason_disconnected
- invalidate_skipped_reason_offline
- nix_retry_skipped_reason_initiator_retrieve
- nix_skipped_reason_config_noent
- nix_skipped_reason_disconnected
- nix_skipped_reason_in_progress
- nix_skipped_reason_offline
- reconciled_data_entries
- reconciled_lock_entries
plugins:
- FlexCache
- MetricAgent:
compute_metric:
- miss_percent PERCENT blocks_retrieved_from_origin blocks_requested_from_client
export_options:
instance_keys:
- svm
- volume