diff --git a/conf/rest/9.6.0/fcp.yaml b/conf/rest/9.6.0/fcp.yaml new file mode 100644 index 000000000..0e82a70df --- /dev/null +++ b/conf/rest/9.6.0/fcp.yaml @@ -0,0 +1,37 @@ +name: FCP +query: api/network/fc/ports +object: fcp + +counters: + - ^^uuid + - ^enabled => enabled + - ^fabric.connected => fabric_connected + - ^fabric.name => fabric_name + - ^fabric.port_address => fabric_port_address + - ^fabric.switch_port => fabric_switch_port + - ^name => port + - ^node.name => node + - ^physical_protocol + - ^speed.configured => speed_configured + - ^state + - ^supported_protocols => supported_protocols + - fabric.connected_speed => fabric_connected_speed + - speed.maximum => max_speed + - hidden_fields: + - fabric + +export_options: + instance_keys: + - node + - port + instance_labels: + - enabled + - fabric_connected + - fabric_name + - fabric_port_address + - fabric_switch_port + - physical_protocol + - speed_configured + - state + - supported_protocols + diff --git a/conf/rest/default.yaml b/conf/rest/default.yaml index b0b15e861..842998c47 100644 --- a/conf/rest/default.yaml +++ b/conf/rest/default.yaml @@ -16,6 +16,7 @@ objects: Disk: disk.yaml EmsDestination: ems_destination.yaml # ExportRule: exports.yaml + FCP: fcp.yaml LIF: lif.yaml Health: health.yaml Lun: lun.yaml diff --git a/grafana/dashboards/cmode/network.json b/grafana/dashboards/cmode/network.json index 77097072a..f790699a1 100644 --- a/grafana/dashboards/cmode/network.json +++ b/grafana/dashboards/cmode/network.json @@ -1655,6 +1655,227 @@ ], "type": "table" }, + { + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 117, + "options": { + "content": "This panel requires ONTAP 9.6+ and the APIs are only available via REST. Enable the REST collector in your `harvest.yml` config.
\nSee https://github.com/NetApp/harvest/wiki/Troubleshooting-Harvest#why-do-i-have-fc-ports-with-fabric-detail-table-empty-in-network-dashboard\nfor more details.", + "mode": "markdown" + }, + "pluginVersion": "8.1.8", + "type": "text" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": {}, + "unit": "string" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Speed" + }, + "properties": [ + { + "id": "unit", + "value": "Gbits" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Connected Speed" + }, + "properties": [ + { + "id": "unit", + "value": "Gbits" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Enabled" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "No" + }, + "true": { + "index": 0, + "text": "Yes" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Fabric Connected" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "false": { + "index": 1, + "text": "No" + }, + "true": { + "index": 0, + "text": "Yes" + } + }, + "type": "value" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 115, + "interval": "", + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.8", + "targets": [ + { + "exemplar": false, + "expr": "fcp_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\",port=~\"$FCP\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "exemplar": false, + "expr": "fcp_max_speed{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\",port=~\"$FCP\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "exemplar": false, + "expr": "fcp_fabric_connected_speed{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\",port=~\"$FCP\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "FC ports with Fabric detail", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "fabric_connected", + "fabric_name", + "fabric_switch_port", + "node", + "physical_protocol", + "port", + "speed_configured", + "state", + "supported_protocols", + "Value #B", + "Value #A", + "fabric_port_address", + "enabled" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value #A": 12, + "Value #B": 11, + "enabled": 2, + "fabric_connected": 3, + "fabric_name": 4, + "fabric_port_address": 5, + "fabric_switch_port": 6, + "node": 1, + "physical_protocol": 7, + "port": 0, + "speed_configured": 8, + "state": 9, + "supported_protocols": 10 + }, + "renameByName": { + "Value #A": "Connected Speed", + "Value #B": "Max Speed", + "enabled": "Enabled", + "fabric_connected": "Fabric Connected", + "fabric_name": "Fabric Name", + "fabric_port_address": "Fabric Port", + "fabric_switch_port": "Fabric Switch Port", + "node": "Node", + "physical_protocol": "Physical Protocol", + "port": "Port Name", + "speed_configured": "Speed Configured", + "state": "State", + "supported_protocols": "Supported Protocols" + } + } + } + ], + "type": "table" + }, { "datasource": "${DS_PROMETHEUS}", "description": "", @@ -1715,7 +1936,7 @@ "h": 10, "w": 12, "x": 0, - "y": 23 + "y": 36 }, "id": 67, "options": { @@ -1808,7 +2029,7 @@ "h": 10, "w": 12, "x": 12, - "y": 23 + "y": 36 }, "id": 69, "options": { @@ -1900,7 +2121,7 @@ "h": 10, "w": 12, "x": 0, - "y": 33 + "y": 46 }, "id": 77, "options": { @@ -1993,7 +2214,7 @@ "h": 10, "w": 12, "x": 12, - "y": 33 + "y": 46 }, "id": 78, "options": { @@ -2086,7 +2307,7 @@ "h": 10, "w": 6, "x": 0, - "y": 43 + "y": 56 }, "id": 75, "options": { @@ -2206,7 +2427,7 @@ "h": 10, "w": 6, "x": 6, - "y": 43 + "y": 56 }, "id": 76, "options": { @@ -2332,7 +2553,7 @@ "h": 10, "w": 6, "x": 12, - "y": 43 + "y": 56 }, "id": 73, "options": { @@ -2424,7 +2645,7 @@ "h": 10, "w": 6, "x": 18, - "y": 43 + "y": 56 }, "id": 74, "options": { @@ -3291,7 +3512,7 @@ "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(fcp_total_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\"}, port)", + "definition": "label_values(fcp_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\"}, port)", "description": null, "error": null, "hide": 0, @@ -3301,7 +3522,7 @@ "name": "FCP", "options": [], "query": { - "query": "label_values(fcp_total_data{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\"}, port)", + "query": "label_values(fcp_labels{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\",node=~\"$Node\"}, port)", "refId": "StandardVariableQuery" }, "refresh": 2,