diff --git a/cmd/tools/generate/counter.go b/cmd/tools/generate/counter.go index f0d2a93c0..8c9282b58 100644 --- a/cmd/tools/generate/counter.go +++ b/cmd/tools/generate/counter.go @@ -155,6 +155,7 @@ var ( "nfs_clients_idle_duration", "ems_events", "volume_top_clients", + "volume_top_files", } excludeDocumentedZapiMetrics = []string{ diff --git a/cmd/tools/generate/counter.yaml b/cmd/tools/generate/counter.yaml index e66326695..c01822fe7 100644 --- a/cmd/tools/generate/counter.yaml +++ b/cmd/tools/generate/counter.yaml @@ -1712,6 +1712,38 @@ counters: ONTAPCounter: iops.read Template: conf/rest/9.12.0/volume.yaml + - Name: volume_top_files_read_ops + Description: This metric tracks the number of read operations performed on the files of a specific volume. + APIs: + - API: REST + Endpoint: api/storage/volumes/*/top-metrics/files + ONTAPCounter: iops.read + Template: conf/rest/9.12.0/volume.yaml + + - Name: volume_top_files_write_ops + Description: This metric tracks the number of write operations performed on the files of a specific volume. + APIs: + - API: REST + Endpoint: api/storage/volumes/*/top-metrics/files + ONTAPCounter: iops.read + Template: conf/rest/9.12.0/volume.yaml + + - Name: volume_top_files_read_data + Description: This metric measures the amount of data read from the files of a specific volume. + APIs: + - API: REST + Endpoint: api/storage/volumes/*/top-metrics/files + ONTAPCounter: iops.read + Template: conf/rest/9.12.0/volume.yaml + + - Name: volume_top_files_write_data + Description: This metric measures the amount of data written to the top files of a specific volume. + APIs: + - API: REST + Endpoint: api/storage/volumes/*/top-metrics/files + ONTAPCounter: iops.read + Template: conf/rest/9.12.0/volume.yaml + - Name: volume_clone_split_estimate Description: Display an estimate of additional storage required in the underlying aggregate to perform a volume clone split operation. APIs: @@ -1947,4 +1979,12 @@ counters: - API: ZAPI Endpoint: NA ONTAPCounter: Harvest generated - Template: conf/zapi/cdot/9.8.0/netport.yaml \ No newline at end of file + Template: conf/zapi/cdot/9.8.0/netport.yaml + + - Name: fru_status + Description: This metric indicates a value of 1 if the FRU status is ok and a value of 0 for any other state. + APIs: + - API: REST + Endpoint: NA + ONTAPCounter: Harvest generated + Template: conf/rest/9.12.0/fru.yaml diff --git a/conf/rest/9.12.0/fru.yaml b/conf/rest/9.12.0/fru.yaml new file mode 100644 index 000000000..e6315e484 --- /dev/null +++ b/conf/rest/9.12.0/fru.yaml @@ -0,0 +1,18 @@ +name: FRU +query: api/private/cli/system/controller/fru +object: fru + +counters: + - ^^node => node + - ^^serial_number => serial_number + - ^fru_name => name + - ^status => status + - ^subsystem => subsystem + +plugins: + - LabelAgent: + value_to_num: # metric label zapi_value rest_value `default_value` + - status status ok ok `0` + +export_options: + include_all_labels: true diff --git a/conf/rest/default.yaml b/conf/rest/default.yaml index 258357c71..495451a07 100644 --- a/conf/rest/default.yaml +++ b/conf/rest/default.yaml @@ -21,6 +21,7 @@ objects: # ExportRule: exports.yaml FlexCache: flexcache.yaml FCP: fcp.yaml + FRU: fru.yaml LIF: lif.yaml # Lock: lock.yaml Health: health.yaml diff --git a/docs/ontap-metrics.md b/docs/ontap-metrics.md index 2d69aed01..c491c8340 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 : 2024-Nov-06 +Creation Date : 2024-Nov-15 ONTAP Version: 9.15.1 ``` ## Understanding the structure @@ -3059,6 +3059,15 @@ Physical size of the FlexCache. The recommended size for a FlexCache is 10% of t | ZAPI | `flexcache-get-iter` | `flexcache-info.size` | conf/zapi/cdot/9.8.0/flexcache.yaml | +### fru_status + +This metric indicates a value of 1 if the FRU status is ok and a value of 0 for any other state. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `NA` | `Harvest generated` | conf/rest/9.12.0/fru.yaml | + + ### headroom_aggr_current_latency This is the storage aggregate average latency per message at the disk level. @@ -15843,6 +15852,42 @@ This metric tracks the number of write operations performed by the top clients o | REST | `api/storage/volumes/*/top-metrics/clients` | `iops.read` | conf/rest/9.12.0/volume.yaml | +### volume_top_files_read_data + +This metric measures the amount of data read from the files of a specific volume. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/storage/volumes/*/top-metrics/files` | `iops.read` | conf/rest/9.12.0/volume.yaml | + + +### volume_top_files_read_ops + +This metric tracks the number of read operations performed on the files of a specific volume. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/storage/volumes/*/top-metrics/files` | `iops.read` | conf/rest/9.12.0/volume.yaml | + + +### volume_top_files_write_data + +This metric measures the amount of data written to the top files of a specific volume. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/storage/volumes/*/top-metrics/files` | `iops.read` | conf/rest/9.12.0/volume.yaml | + + +### volume_top_files_write_ops + +This metric tracks the number of write operations performed on the files of a specific volume. + +| API | Endpoint | Metric | Template | +|--------|----------|--------|---------| +| REST | `api/storage/volumes/*/top-metrics/files` | `iops.read` | conf/rest/9.12.0/volume.yaml | + + ### volume_total_data This metric represents the total amount of data that has been read from and written to a specific volume. diff --git a/grafana/dashboards/cmode/power.json b/grafana/dashboards/cmode/power.json index 2deb35985..931cdeedc 100644 --- a/grafana/dashboards/cmode/power.json +++ b/grafana/dashboards/cmode/power.json @@ -71,7 +71,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1727437918841, + "iteration": 1731674846895, "links": [ { "asDropdown": true, @@ -2055,7 +2055,7 @@ "h": 8, "w": 24, "x": 0, - "y": 58 + "y": 59 }, "id": 86, "options": { @@ -2137,13 +2137,178 @@ }, { "collapsed": true, - "datasource": "${DS_PROMETHEUS}", + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 59 }, + "id": 104, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 60 + }, + "id": 108, + "options": { + "content": "This panel requires a cluster with ONTAP 9.6+ and the Harvest REST collector.", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "type": "text" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Displays information about the status of Field Replaceable Units (FRUs).", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Status" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "degraded": { + "color": "red", + "index": 0 + }, + "unknown": { + "color": "red", + "index": 2 + }, + "unreachable": { + "color": "red", + "index": 1 + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 62 + }, + "id": 106, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Subsystem" + } + ] + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "fru_status{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Field Replaceable Unit (FRU)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "cluster", + "datacenter", + "name", + "node", + "serial_number", + "status", + "subsystem" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "cluster": 1, + "datacenter": 0, + "name": 3, + "node": 2, + "serial_number": 4, + "status": 6, + "subsystem": 5 + }, + "renameByName": { + "cluster": "Cluster", + "datacenter": "Datacenter", + "name": "Name", + "node": "Node", + "serial_number": "Serial Number", + "status": "Status", + "subsystem": "Subsystem" + } + } + } + ], + "type": "table" + } + ], + "title": "Field Replaceable Unit (FRU)", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 60 + }, "id": 76, "panels": [ { @@ -2745,7 +2910,7 @@ "h": 1, "w": 24, "x": 0, - "y": 60 + "y": 61 }, "id": 78, "panels": [ @@ -3658,5 +3823,5 @@ "timezone": "", "title": "ONTAP: Power", "uid": "cdot-power", - "version": 16 + "version": 17 } diff --git a/integration/test/dashboard_json_test.go b/integration/test/dashboard_json_test.go index 25928cc9e..7eaa6c414 100644 --- a/integration/test/dashboard_json_test.go +++ b/integration/test/dashboard_json_test.go @@ -47,6 +47,7 @@ var zapiCounterMap = map[string]struct{}{ // Below are not available in ZAPI "aggr_object_store_logical_used": {}, "aggr_object_store_physical_used": {}, + "fru_status": {}, } // restCounterMap are additional counters, above and beyond the ones from counterMap, which should be excluded from Rest