diff --git a/cmd/tools/generate/counter.yaml b/cmd/tools/generate/counter.yaml index d41176c46..32960aab2 100644 --- a/cmd/tools/generate/counter.yaml +++ b/cmd/tools/generate/counter.yaml @@ -2022,4 +2022,37 @@ counters: - API: ZAPI Endpoint: NA ONTAPCounter: Harvest generated - Template: conf/zapiperf/cdot/9.8.0/disk.yaml \ No newline at end of file + Template: conf/zapiperf/cdot/9.8.0/disk.yaml + + - Name: snapmirror_history_start_time + Description: Displays the time at which the snapmirror data transfer job started. + + - Name: snapmirror_history_end_time + Description: Displays the time at which the snapmirror data transfer job ended. + + - Name: snapmirror_history_transfer_size + Description: Displays the amount of data (in bytes) being transferred from source to destination in the snapmirror job. + + - Name: snapmirror_history_duration + Description: Displays the duration of the snapmirror data transfer job. + APIs: + - API: REST + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/rest/9.6.0/snapmirrorhistory.yaml + - API: ZAPI + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml + + - Name: snapmirror_history_bandwidth + Description: Displays the bandwidth of the snapmirror data transfer job. + APIs: + - API: REST + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/rest/9.6.0/snapmirrorhistory.yaml + - API: ZAPI + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml \ No newline at end of file diff --git a/conf/rest/9.6.0/snapmirrorhistory.yaml b/conf/rest/9.6.0/snapmirrorhistory.yaml new file mode 100644 index 000000000..9c7e9f2cf --- /dev/null +++ b/conf/rest/9.6.0/snapmirrorhistory.yaml @@ -0,0 +1,43 @@ +name: SnapMirrorHistory +query: api/private/cli/snapmirror/show-history +object: snapmirror_history + +counters: + - ^^operation_id + - ^destination_path => destination_location + - ^destination_volume + - ^destination_vserver + - ^operation_type + - ^relationship_group_type => group_type + - ^relationship_id => relationship_id + - ^result => result + - ^source_path => source_location + - ^source_volume + - ^source_vserver + - end_time(timestamp) => end_time + - start_time(timestamp) => start_time + - transfer_size + +# - filter: +# - expand=true + +plugins: + - MetricAgent: + compute_metric: + - duration SUBTRACT end_time start_time + - bandwidth DIVIDE transfer_size duration + +export_options: + instance_keys: + - destination_location + - destination_volume + - destination_vserver + - operation_id + - relationship_id + - source_volume + - source_vserver + instance_labels: + - group_type + - operation_type + - result + diff --git a/conf/rest/default.yaml b/conf/rest/default.yaml index 054f0f7f0..a769b73d6 100644 --- a/conf/rest/default.yaml +++ b/conf/rest/default.yaml @@ -54,6 +54,7 @@ objects: Sensor: sensor.yaml Shelf: shelf.yaml SnapMirror: snapmirror.yaml + SnapMirrorHistory: snapmirrorhistory.yaml SnapMirrorPolicy: snapmirrorpolicy.yaml SnapshotPolicy: snapshotpolicy.yaml Status: status.yaml diff --git a/conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml b/conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml new file mode 100644 index 000000000..033ef42f0 --- /dev/null +++ b/conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml @@ -0,0 +1,39 @@ +name: SnapMirrorHistory +query: snapmirror-history-get-iter +object: snapmirror_history +counters: + snapmirror-history-info: + - ^^operation-id + - ^destination-location + - ^destination-volume + - ^destination-vserver + - ^operation-type + - ^relationship-group-type => group_type + - ^relationship-id + - ^result => result + - ^source-location + - ^source-volume + - ^source-vserver + - end-time + - start-time + - transfer-size + +plugins: + - MetricAgent: + compute_metric: + - duration SUBTRACT end_time start_time + - bandwidth DIVIDE transfer_size duration + +export_options: + instance_keys: + - destination_location + - destination_volume + - destination_vserver + - operation_id + - relationship_id + - source_volume + - source_vserver + instance_labels: + - group_type + - operation_type + - result diff --git a/conf/zapi/default.yaml b/conf/zapi/default.yaml index ada1502ae..64ed0dfa3 100644 --- a/conf/zapi/default.yaml +++ b/conf/zapi/default.yaml @@ -35,6 +35,7 @@ objects: Sensor: sensor.yaml Shelf: shelf.yaml SnapMirror: snapmirror.yaml + SnapMirrorHistory: snapmirrorhistory.yaml SnapshotPolicy: snapshotpolicy.yaml Status: status.yaml Status_7mode: status_7.yaml diff --git a/docs/ontap-metrics.md b/docs/ontap-metrics.md index 20aea031d..fe285b57e 100644 --- a/docs/ontap-metrics.md +++ b/docs/ontap-metrics.md @@ -7,7 +7,7 @@ These can be generated on demand by running `bin/harvest grafana metrics`. See - More information about ONTAP REST performance counters can be found [here](https://docs.netapp.com/us-en/ontap-pcmap-9121/index.html). ``` -Creation Date : 2025-Feb-12 +Creation Date : 2025-Feb-18 ONTAP Version: 9.16.1 ``` ## Understanding the structure @@ -11370,6 +11370,56 @@ The number of successful SnapMirror break operations for the relationship | ZAPI | `snapmirror-get-iter` | `snapmirror-info.break-successful-count` | conf/zapi/cdot/9.8.0/snapmirror.yaml | +### snapmirror_history_bandwidth + +Displays the bandwidth of the snapmirror data transfer job. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `NA` | `Harvest generated` | conf/rest/9.6.0/snapmirrorhistory.yaml | +| ZAPI | `NA` | `Harvest generated` | conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml | + + +### snapmirror_history_duration + +Displays the duration of the snapmirror data transfer job. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `NA` | `Harvest generated` | conf/rest/9.6.0/snapmirrorhistory.yaml | +| ZAPI | `NA` | `Harvest generated` | conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml | + + +### snapmirror_history_end_time + +Displays the time at which the snapmirror data transfer job ended. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/private/cli/snapmirror/show-history` | `end_time` | conf/rest/9.6.0/snapmirrorhistory.yaml | +| ZAPI | `snapmirror-history-get-iter` | `snapmirror-history-info.end-time` | conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml | + + +### snapmirror_history_start_time + +Displays the time at which the snapmirror data transfer job started. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/private/cli/snapmirror/show-history` | `start_time` | conf/rest/9.6.0/snapmirrorhistory.yaml | +| ZAPI | `snapmirror-history-get-iter` | `snapmirror-history-info.start-time` | conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml | + + +### snapmirror_history_transfer_size + +Displays the amount of data (in bytes) being transferred from source to destination in the snapmirror job. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/private/cli/snapmirror/show-history` | `transfer_size` | conf/rest/9.6.0/snapmirrorhistory.yaml | +| ZAPI | `snapmirror-history-get-iter` | `snapmirror-history-info.transfer-size` | conf/zapi/cdot/9.8.0/snapmirrorhistory.yaml | + + ### snapmirror_lag_time Amount of time since the last snapmirror transfer in seconds