diff --git a/.gitignore b/.gitignore index 896ce43..5f059fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Ignore bin directory contents bin/* -log/ \ No newline at end of file +log/ +/vendor/ \ No newline at end of file diff --git a/Makefile b/Makefile index 32c97ec..23391e7 100644 --- a/Makefile +++ b/Makefile @@ -24,4 +24,28 @@ generate-bundles: .PHONY: compare-bundles compare-bundles: generate-bundles - git diff --exit-code \ No newline at end of file + git diff --exit-code + +JSONNET_SRC_DIR := src/dashboards +JSONNET_TARGET_DIR := config/examples/dashboards +JSONNET_TARGETS := $(addprefix $(JSONNET_TARGET_DIR)/,$(patsubst %.jsonnet,%.json,$(shell ls $(JSONNET_SRC_DIR)/*.jsonnet | xargs -n 1 basename))) +DASHBOARD_CR_TARGETS := $(addprefix $(JSONNET_TARGET_DIR)/,$(patsubst %.jsonnet,%.yaml,$(shell ls $(JSONNET_SRC_DIR)/*.jsonnet | xargs -n 1 basename))) + +$(JSONNET_TARGET_DIR)/%.json: $(JSONNET_SRC_DIR)/%.jsonnet + jsonnet -J vendor $< -o $@ + +$(JSONNET_TARGET_DIR)/%.yaml: $(JSONNET_TARGET_DIR)/%.json + DASHBOARD_NAME=$(shell echo "$<" | sed -r "s/.+\/(.+)\..+/\1/") envsubst < $(JSONNET_SRC_DIR)/dashboard_cr_template.yaml > $@ + cat "$<" | jq -c . >> $@ + +.PHONY: generate-dashboards +generate-dashboards: ${JSONNET_TARGETS} + +.PHONY: generate-dashboard-crs +generate-dashboard-crs: generate-dashboards ${DASHBOARD_CR_TARGETS} + +.PHONY: apply-latest-dashboard-crs +apply-latest-dashboard-crs: generate-dashboard-crs + for i in ${DASHBOARD_CR_TARGETS}; do kubectl apply -f $$i; done + +print-% : ; @echo $* = $($*) diff --git a/README.md b/README.md index a8e243e..77ebd8c 100644 --- a/README.md +++ b/README.md @@ -412,6 +412,41 @@ gatewayapi_udproute_parent_info{name="",namespace="",p gatewayapi_udproute_status_parent_info{name="",namespace="",parent_group="",parent_kind="",parent_name="",parent_namespace=""} ``` +## Local dashboard development + +Dashboards are written in jsonnet, and use the [grafonnet library](https://github.com/grafana/grafonnet). +Resulting dashboard json files are checked in. +To generate dashboards, run `make generate-dashboards`. + +Local development can be done using a combination of automatic jsonnet execution +and using the [grafana-operator](https://github.com/grafana-operator/grafana-operator) +to automatically update dashboards in Grafana. This allows for a relatviely fast +development loop where you can change a dashboard jsonnet file, save it, then +see the changes automically in a browser. + +To set up the local development environment, run the following: +```shell +./hack/local_dev.sh +``` + +## Grafonnet Development Guidelines + +### Experiment and Learn + +Grafonnet is a powerful tool, but it may not cover all scenarios in its documentation. If you encounter issues or roadblocks, don’t be afraid to experiment with different approaches. Learning through trial and error can often lead to better understanding and innovative solutions. Remember, every challenge is an opportunity to learn. + +### Use Grafana UI Reference + +Grafana’s user interface can be an invaluable reference when working with transformations and overrides in Grafonnet. If you’re unsure about how to implement a specific feature in Grafonnet, try creating it in the Grafana UI first. Then, export the dashboard as JSON. This exported JSON can serve as a reference for how to implement the same feature in Grafonnet. + +### Panel Abstraction and Reuse + +Consider creating abstract representations of panels that are used repeatedly across your dashboards. This not only helps avoid repetition but also ensures consistency in the layout and design of your panels. + +Abstraction can also make your code more readable and maintainable, especially when dealing with complex input patterns. When deciding whether to create a new abstraction or reuse an existing one, keep the “Don’t Repeat Yourself” (DRY) principle in mind. If you find yourself writing similar code for multiple panels, it might be time to consider abstraction. + +By following these guidelines, you can navigate Grafonnet development more effectively and efficiently. Remember, the goal is not just to create functional dashboards, but also to write clean, maintainable code that can be understood and modified by others. + ## Contributing Contributions are welcome in the form of bugs, feature requests & pull requests. diff --git a/config/examples/dashboards/gatewayclasses.json b/config/examples/dashboards/gatewayclasses.json index d712cc5..25f71d3 100644 --- a/config/examples/dashboards/gatewayclasses.json +++ b/config/examples/dashboards/gatewayclasses.json @@ -1,683 +1,389 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1694697359281, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 14, - "panels": [], - "title": "Gateway Classes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of GatewayClasses across all clusters", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "Gateway Classes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gatewayclass_info)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total GatewayClasses with an Accepted state of True", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of GatewayClasses across all clusters", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gatewayclass_info)", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Accepted", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total GatewayClasses with an Accepted state of True", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)", + "instant": true + } + ], + "title": "Accepted", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gatewayclass_created", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GatewayClasses", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gatewayclass_created", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true, - "customresource_kind": true + ], + "title": "GatewayClasses", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "Value" + ] + } + } }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Gateway Details", - "url": "/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true, + "customresource_kind": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 10, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_info", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateways (by GatewayClass)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "gatewayclass_name", - "name", - "namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Gateway Details", + "url": "/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}" + } + ] + }, + { + "id": "custom.displayMode", + "value": "color-text" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_info", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false, - "customresource_kind": true - }, - "indexByName": { - "Value": 3, - "gatewayclass_name": 2, - "name": 0, - "namespace": 1 + ], + "title": "Gateways (by GatewayClass)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "gatewayclass_name", + "name", + "namespace" + ] + } + } }, - "renameByName": { - "Value": "# Instances", - "customresource_kind": "Kind", - "customresource_version": "Version", - "gatewayclass_name": "GatewayClass", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false, + "customresource_kind": true + }, + "indexByName": { + "Value": 3, + "gatewayclass_name": 2, + "name": 0, + "namespace": 1 + }, + "renameByName": { + "Value": "# Instances", + "customresource_kind": "Kind", + "customresource_version": "Version", + "gatewayclass_name": "GatewayClass", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "custom.width", - "value": 333 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 20, - "x": 4, - "y": 7 + ], + "type": "table" }, - "id": 33, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Supported Features (by GatewayClass)", - "transformations": [ - { - "id": "reduce", - "options": { - "includeTimeField": false, - "labelsToFields": true, - "mode": "seriesToRows", - "reducers": [ - "last" + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "custom.width", + "value": 333 + } + ] + } ] - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "features", - "name" - ] - } - } - }, - { - "id": "groupBy", - "options": { - "fields": { - "features": { - "aggregations": [ - "allValues" - ], - "operation": "aggregate" - }, - "name": { - "aggregations": [], - "operation": "groupby" - } + }, + "gridPos": { + "h": 6, + "w": 20, + "x": 4, + "y": 7 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "features (allValues)": "Features", - "name": "GatewayClass" + ], + "title": "Supported Features (by GatewayClass)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "features", + "name" + ] + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "features": { + "aggregations": [ + "allValues" + ], + "operation": "aggregate" + }, + "name": { + "aggregations": [ ], + "operation": "groupby" + } + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { }, + "indexByName": { }, + "renameByName": { + "features (allValues)": "Features", + "name": "GatewayClass" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": { - "selected": true, - "text": "istio", - "value": "istio" - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_gatewayclass_info, name)", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "gatewayclass", - "options": [], - "query": { - "query": "label_values(gatewayapi_gatewayclass_info, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / GatewayClasses", - "uid": "gatewayapigatewayclass", - "version": 1, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "GatewayClass", + "multi": true, + "name": "gatewayclass", + "query": { + "query": "label_values(gatewayapi_gatewayclass_info, name)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / GatewayClasses", + "uid": "gatewayapigatewayclass" +} diff --git a/config/examples/dashboards/gatewayclasses.yaml b/config/examples/dashboards/gatewayclasses.yaml new file mode 100644 index 0000000..722bf2b --- /dev/null +++ b/config/examples/dashboards/gatewayclasses.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: gatewayclasses +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"Gateway Classes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of GatewayClasses across all clusters","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gatewayclass_info)","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total GatewayClasses with an Accepted state of True","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)","instant":true}],"title":"Accepted","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gatewayclass_created","format":"table","instant":true,"range":false}],"title":"GatewayClasses","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true,"customresource_kind":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"links","value":[{"title":"Gateway Details","url":"/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}"}]},{"id":"custom.displayMode","value":"color-text"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_info","format":"table","instant":true,"range":false}],"title":"Gateways (by GatewayClass)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["gatewayclass_name","name","namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":false,"customresource_kind":true},"indexByName":{"Value":3,"gatewayclass_name":2,"name":0,"namespace":1},"renameByName":{"Value":"# Instances","customresource_kind":"Kind","customresource_version":"Version","gatewayclass_name":"GatewayClass","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"name"},"properties":[{"id":"custom.width","value":333}]}]},"gridPos":{"h":6,"w":20,"x":4,"y":7},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}","format":"table","instant":true,"range":false}],"title":"Supported Features (by GatewayClass)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["features","name"]}}},{"id":"groupBy","options":{"fields":{"features":{"aggregations":["allValues"],"operation":"aggregate"},"name":{"aggregations":[],"operation":"groupby"}}}},{"id":"organize","options":{"excludeByName":{},"indexByName":{},"renameByName":{"features (allValues)":"Features","name":"GatewayClass"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"GatewayClass","multi":true,"name":"gatewayclass","query":{"query":"label_values(gatewayapi_gatewayclass_info, name)","refId":"StandardVariableQuery"},"regex":"","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / GatewayClasses","uid":"gatewayapigatewayclass"} diff --git a/config/examples/dashboards/gateways.json b/config/examples/dashboards/gateways.json index d04f677..2d7db41 100644 --- a/config/examples/dashboards/gateways.json +++ b/config/examples/dashboards/gateways.json @@ -1,2083 +1,1384 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1694614167005, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "title": "Gateways", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of Gateways across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 21, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "Gateways", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_info{name=~\"$gateway\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Number of Gateways not in an Accepted and Programmed state", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of Gateways across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_info{name=~\"$gateway\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count((gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} == 0) or (gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} == 0)) or vector(0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Unhealthy", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 125 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Number of Gateways not in an Accepted and Programmed state", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count((gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} == 0) or (gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} == 0)) or vector(0)", + "instant": true + } + ], + "title": "Unhealthy", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_created{name=~\"$gateway\"} * on(name, namespace, instance) group_right gatewayapi_gateway_info{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateways", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "gatewayclass_name", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "125" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_created{name=~\"$gateway\"} * on(name, namespace, instance) group_right gatewayapi_gateway_info{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true, - "customresource_kind": true + ], + "title": "Gateways", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "gatewayclass_name", + "name", + "namespace", + "Value" + ] + } + } }, - "indexByName": { - "Created At": 6, - "Value": 5, - "customresource_kind": 0, - "customresource_version": 1, - "gatewayclass_name": 4, - "name": 2, - "namespace": 3 + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "gatewayclass_name": "GatewayClass", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true, + "customresource_kind": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "gatewayclass_name": "GatewayClass", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 94 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 112 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 77 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 91 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 5, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_listener_info{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateway Listeners", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "hostname", - "listener_name", - "name", - "namespace", - "port", - "protocol", - "tls_mode", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "94" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "112" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "77" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "91" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_listener_info{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 + ], + "title": "Gateway Listeners", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "hostname", + "listener_name", + "name", + "namespace", + "port", + "protocol", + "tls_mode", + "Value" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total Gateways with an Accepted state of True", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} > 0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Accepted", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total Gateways with a Programmed state of True", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 4 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total Gateways with an Accepted state of True", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} > 0)", + "instant": true + } + ], + "title": "Accepted", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} > 0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Programmed", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of listeners across all Gateways", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 7 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total Gateways with a Programmed state of True", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 4 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} > 0)", + "instant": true + } + ], + "title": "Programmed", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_listener_info{name=~\"$gateway\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Listeners", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of attached routes across all listeners", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 7 - }, - "id": 25, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of listeners across all Gateways", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 7 + }, + "id": 8, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_listener_info{name=~\"$gateway\"})", + "instant": true + } + ], + "title": "Listeners", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Routes", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 94 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 136 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 9, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of attached routes across all listeners", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 7 + }, + "id": 9, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"})", + "instant": true + } + ], + "title": "Att. Routes", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_status_address_info{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateway Status Addresses", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "type", - "value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "94" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "136" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 10, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_status_address_info{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 + ], + "title": "Gateway Status Addresses", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "type", + "value" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 88 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 113 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 167 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# Attached Routes" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - } - ] + ], + "type": "table" }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 7 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateway Listener Status - Attached Routes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "listener_name", - "name", - "namespace", - "Value" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "113" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "88" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "167" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "167" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "# Attached Routes" + }, + "properties": [ + { + "id": "custom.width", + "value": "137" + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 7 + }, + "id": 11, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "Gateway Listener Status - Attached Routes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "listener_name", + "name", + "namespace", + "Value" + ] + } + } }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "HTTPRoute Details", - "url": "/d/gatewayapihttproutes/gateway-api-state-httproutes?var-httproute=${__value.text}" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 13 - }, - "id": 31, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "HTTPRoute Details", + "url": "/d/gatewayapihttproutes/gateway-api-state-httproutes?var-httproute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 13 + }, + "id": 12, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "HTTPRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "GRPCRoute Details", - "url": "/d/gatewayapigrpcroutes/gateway-api-state-grpcroutes?var-grpcroute=${__value.text}" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 13 - }, - "id": 32, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "GRPCRoute Details", + "url": "/d/gatewayapigrpcroutes/gateway-api-state-grpcroutes?var-grpcroute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 13 + }, + "id": 13, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "GRPCRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "TLSRoute Details", - "url": "/d/gatewayapitlsroutes/gateway-api-state-tlsroutes?var-tlsroute=${__value.text}" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 19 - }, - "id": 35, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "TLSRoute Details", + "url": "/d/gatewayapitlsroutes/gateway-api-state-tlsroutes?var-tlsroute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 19 + }, + "id": 14, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "TLSRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "TCPRoute Details", - "url": "/d/gatewayapitcproutes/gateway-api-state-tcproutes?var-tcproute=${__value.text}" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 19 - }, - "id": 33, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "TCPRoute Details", + "url": "/d/gatewayapitcproutes/gateway-api-state-tcproutes?var-tcproute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 19 + }, + "id": 15, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "TCPRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "UCPRoute Details", - "url": "/d/gatewayapiudproutes/gateway-api-state-udproutes?var-udproute=${__value.text}" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 25 - }, - "id": 34, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "UDPRoute Details", + "url": "/d/gatewayapiudproutes/gateway-api-state-udproutes?var-udproute=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 25 + }, + "id": 16, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 + ], + "title": "UDPRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_gateway_info, name)", - "hide": 0, - "includeAll": true, - "label": "Gateway", - "multi": true, - "name": "gateway", - "options": [], - "query": { - "query": "label_values(gatewayapi_gateway_info, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / Gateways", - "uid": "gatewayapigateways", - "version": 3, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "Gateway", + "multi": true, + "name": "gateway", + "query": { + "query": "label_values(gatewayapi_gateway_info, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / Gateways", + "uid": "gatewayapigateways" +} diff --git a/config/examples/dashboards/gateways.yaml b/config/examples/dashboards/gateways.yaml new file mode 100644 index 0000000..0a9880b --- /dev/null +++ b/config/examples/dashboards/gateways.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: gateways +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"Gateways","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of Gateways across all namespaces","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gateway_info{name=~\"$gateway\"})","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Number of Gateways not in an Accepted and Programmed state","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count((gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} == 0) or (gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} == 0)) or vector(0)","instant":true}],"title":"Unhealthy","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"125"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_created{name=~\"$gateway\"} * on(name, namespace, instance) group_right gatewayapi_gateway_info{name=~\"$gateway\"}","format":"table","instant":true,"range":false}],"title":"Gateways","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","gatewayclass_name","name","namespace","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true,"customresource_kind":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","gatewayclass_name":"GatewayClass","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"94"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"112"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"77"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"91"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_listener_info{name=~\"$gateway\"}","format":"table","instant":true,"range":false}],"title":"Gateway Listeners","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","hostname","listener_name","name","namespace","port","protocol","tls_mode","Value"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total Gateways with an Accepted state of True","gridPos":{"h":3,"w":2,"x":0,"y":4},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} > 0)","instant":true}],"title":"Accepted","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total Gateways with a Programmed state of True","gridPos":{"h":3,"w":2,"x":2,"y":4},"id":7,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} > 0)","instant":true}],"title":"Programmed","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of listeners across all Gateways","gridPos":{"h":3,"w":2,"x":0,"y":7},"id":8,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_gateway_listener_info{name=~\"$gateway\"})","instant":true}],"title":"Listeners","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of attached routes across all listeners","gridPos":{"h":3,"w":2,"x":2,"y":7},"id":9,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"})","instant":true}],"title":"Att. Routes","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"94"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"136"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":7},"id":10,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_status_address_info{name=~\"$gateway\"}","format":"table","instant":true,"range":false}],"title":"Gateway Status Addresses","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","type","value"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"113"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"88"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"167"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"167"}]},{"matcher":{"id":"byName","options":"# Attached Routes"},"properties":[{"id":"custom.width","value":"137"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":7},"id":11,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"}","format":"table","instant":true,"range":false}],"title":"Gateway Listener Status - Attached Routes","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","listener_name","name","namespace","Value"]}}},{"id":"organize","options":{"excludeByName":{"Value":false},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"# Attached Routes","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.displayMode","value":"color-text"},{"id":"links","value":[{"title":"HTTPRoute Details","url":"/d/gatewayapihttproutes/gateway-api-state-httproutes?var-httproute=${__value.text}"}]}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":13},"id":12,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_httproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}","format":"table","instant":true,"range":false}],"title":"HTTPRoutes (by Gateway)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["name","namespace","parent_name"]}}},{"id":"organize","options":{"excludeByName":{"Value":false},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"# Attached Routes","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"","parent_name":"Gateway","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.displayMode","value":"color-text"},{"id":"links","value":[{"title":"GRPCRoute Details","url":"/d/gatewayapigrpcroutes/gateway-api-state-grpcroutes?var-grpcroute=${__value.text}"}]}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":13},"id":13,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_grpcroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}","format":"table","instant":true,"range":false}],"title":"GRPCRoutes (by Gateway)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["name","namespace","parent_name"]}}},{"id":"organize","options":{"excludeByName":{"Value":false},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"# Attached Routes","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"","parent_name":"Gateway","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.displayMode","value":"color-text"},{"id":"links","value":[{"title":"TLSRoute Details","url":"/d/gatewayapitlsroutes/gateway-api-state-tlsroutes?var-tlsroute=${__value.text}"}]}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":19},"id":14,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tlsroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}","format":"table","instant":true,"range":false}],"title":"TLSRoutes (by Gateway)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["name","namespace","parent_name"]}}},{"id":"organize","options":{"excludeByName":{"Value":false},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"# Attached Routes","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"","parent_name":"Gateway","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.displayMode","value":"color-text"},{"id":"links","value":[{"title":"TCPRoute Details","url":"/d/gatewayapitcproutes/gateway-api-state-tcproutes?var-tcproute=${__value.text}"}]}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":19},"id":15,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tcproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}","format":"table","instant":true,"range":false}],"title":"TCPRoutes (by Gateway)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["name","namespace","parent_name"]}}},{"id":"organize","options":{"excludeByName":{"Value":false},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"# Attached Routes","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"","parent_name":"Gateway","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.displayMode","value":"color-text"},{"id":"links","value":[{"title":"UDPRoute Details","url":"/d/gatewayapiudproutes/gateway-api-state-udproutes?var-udproute=${__value.text}"}]}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":25},"id":16,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_udproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}","format":"table","instant":true,"range":false}],"title":"UDPRoutes (by Gateway)","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["name","namespace","parent_name"]}}},{"id":"organize","options":{"excludeByName":{"Value":false},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"# Attached Routes","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"","parent_name":"Gateway","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"Gateway","multi":true,"name":"gateway","query":{"query":"label_values(gatewayapi_gateway_info, name)","refId":"StandardVariableQuery"},"regex":"/(.*)/","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / Gateways","uid":"gatewayapigateways"} diff --git a/config/examples/dashboards/grpcroutes.json b/config/examples/dashboards/grpcroutes.json index d954520..c83022d 100644 --- a/config/examples/dashboards/grpcroutes.json +++ b/config/examples/dashboards/grpcroutes.json @@ -1,1004 +1,679 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "GRPCRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of GRPCRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "GRPCRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_grpcroute_created{name=~\"${grpcroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by GRPCRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of GRPCRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_grpcroute_created{name=~\"${grpcroute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by GRPCRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_created{name=~\"${grpcroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_created{name=~\"${grpcroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" + ], + "title": "GRPCRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } }, - "mode": "binary", - "reduce": { - "reducer": "sum" + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 + ], + "type": "table" }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true + ], + "title": "GRPCRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to GRPCRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to GRPCRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 + ], + "title": "GRPCRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_grpcroute_created, name)", - "hide": 0, - "includeAll": true, - "label": "GRPCRoute", - "multi": true, - "name": "grpcroute", - "options": [], - "query": { - "query": "label_values(gatewayapi_grpcroute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / GRPCRoutes", - "uid": "gatewayapigrpcroutes", - "version": 3, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "GRPCRoute", + "multi": true, + "name": "grpcroute", + "query": { + "query": "label_values(gatewayapi_grpcroute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / GRPCRoutes", + "uid": "gatewayapigrpcroutes" +} diff --git a/config/examples/dashboards/grpcroutes.yaml b/config/examples/dashboards/grpcroutes.yaml new file mode 100644 index 0000000..4715b48 --- /dev/null +++ b/config/examples/dashboards/grpcroutes.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: grpcroutes +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"GRPCRoutes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of GRPCRoutes across all namespaces","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_grpcroute_created{name=~\"${grpcroute}\"})","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) targeted by GRPCRoutes","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"})","instant":true}],"title":"Tar. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_grpcroute_created{name=~\"${grpcroute}\"}","format":"table","instant":true,"range":false}],"title":"GRPCRoutes","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"}","format":"table","instant":true,"range":false}],"title":"GRPCRoute *targeted* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) attached to GRPCRoutes","gridPos":{"h":3,"w":2,"x":0,"y":4},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"})","instant":true}],"title":"Att. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":7},"id":7,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"}","format":"table","instant":true,"range":false}],"title":"GRPCRoute *attached* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"GRPCRoute","multi":true,"name":"grpcroute","query":{"query":"label_values(gatewayapi_grpcroute_created, name)","refId":"StandardVariableQuery"},"regex":"/(.*)/","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / GRPCRoutes","uid":"gatewayapigrpcroutes"} diff --git a/config/examples/dashboards/httproutes.json b/config/examples/dashboards/httproutes.json index 5104ded..1661645 100644 --- a/config/examples/dashboards/httproutes.json +++ b/config/examples/dashboards/httproutes.json @@ -1,1004 +1,679 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "HTTPRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of HTTPRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "HTTPRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_httproute_created{name=~\"${httproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by HTTPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of HTTPRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_httproute_created{name=~\"${httproute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_httproute_parent_info{name=~\"${httproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by HTTPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_httproute_parent_info{name=~\"${httproute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_created{name=~\"${httproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_created{name=~\"${httproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" + ], + "title": "HTTPRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } }, - "mode": "binary", - "reduce": { - "reducer": "sum" + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 + ], + "type": "table" }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_parent_info{name=~\"${httproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_parent_info{name=~\"${httproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true + ], + "title": "HTTPRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to HTTPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to HTTPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 + ], + "title": "HTTPRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_httproute_created, name)", - "hide": 0, - "includeAll": true, - "label": "HTTPRoute", - "multi": true, - "name": "httproute", - "options": [], - "query": { - "query": "label_values(gatewayapi_httproute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / HTTPRoutes", - "uid": "gatewayapihttproutes", - "version": 3, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "HTTPRoute", + "multi": true, + "name": "httproute", + "query": { + "query": "label_values(gatewayapi_httproute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / HTTPRoutes", + "uid": "gatewayapihttproutes" +} diff --git a/config/examples/dashboards/httproutes.yaml b/config/examples/dashboards/httproutes.yaml new file mode 100644 index 0000000..1fb79c7 --- /dev/null +++ b/config/examples/dashboards/httproutes.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: httproutes +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"HTTPRoutes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of HTTPRoutes across all namespaces","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_httproute_created{name=~\"${httproute}\"})","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) targeted by HTTPRoutes","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_httproute_parent_info{name=~\"${httproute}\"})","instant":true}],"title":"Tar. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_httproute_created{name=~\"${httproute}\"}","format":"table","instant":true,"range":false}],"title":"HTTPRoutes","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_httproute_parent_info{name=~\"${httproute}\"}","format":"table","instant":true,"range":false}],"title":"HTTPRoute *targeted* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) attached to HTTPRoutes","gridPos":{"h":3,"w":2,"x":0,"y":4},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"})","instant":true}],"title":"Att. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":7},"id":7,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"}","format":"table","instant":true,"range":false}],"title":"HTTPRoute *attached* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"HTTPRoute","multi":true,"name":"httproute","query":{"query":"label_values(gatewayapi_httproute_created, name)","refId":"StandardVariableQuery"},"regex":"/(.*)/","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / HTTPRoutes","uid":"gatewayapihttproutes"} diff --git a/config/examples/dashboards/tcproutes.json b/config/examples/dashboards/tcproutes.json index bcd5602..68bbd78 100644 --- a/config/examples/dashboards/tcproutes.json +++ b/config/examples/dashboards/tcproutes.json @@ -1,1004 +1,679 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "TCPRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of TCPRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "TCPRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tcproute_created{name=~\"${tcproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by TCPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of TCPRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tcproute_created{name=~\"${tcproute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by TCPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_created{name=~\"${tcproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_created{name=~\"${tcproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" + ], + "title": "TCPRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } }, - "mode": "binary", - "reduce": { - "reducer": "sum" + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 + ], + "type": "table" }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true + ], + "title": "TCPRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tcp_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tcp_mode": "TCP Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to TCPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to TCPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tcp_mode": 8 + ], + "title": "TCPRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tcp_mode": "TCP Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_tcproute_created, name)", - "hide": 0, - "includeAll": true, - "label": "TCPRoute", - "multi": true, - "name": "tcproute", - "options": [], - "query": { - "query": "label_values(gatewayapi_tcproute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / TCPRoutes", - "uid": "gatewayapitcproutes", - "version": 3, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "TCPRoute", + "multi": true, + "name": "tcproute", + "query": { + "query": "label_values(gatewayapi_tcproute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / TCPRoutes", + "uid": "gatewayapitcproutes" +} diff --git a/config/examples/dashboards/tcproutes.yaml b/config/examples/dashboards/tcproutes.yaml new file mode 100644 index 0000000..94167e0 --- /dev/null +++ b/config/examples/dashboards/tcproutes.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: tcproutes +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"TCPRoutes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of TCPRoutes across all namespaces","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_tcproute_created{name=~\"${tcproute}\"})","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) targeted by TCPRoutes","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"})","instant":true}],"title":"Tar. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tcproute_created{name=~\"${tcproute}\"}","format":"table","instant":true,"range":false}],"title":"TCPRoutes","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"}","format":"table","instant":true,"range":false}],"title":"TCPRoute *targeted* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) attached to TCPRoutes","gridPos":{"h":3,"w":2,"x":0,"y":4},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"})","instant":true}],"title":"Att. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":7},"id":7,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"}","format":"table","instant":true,"range":false}],"title":"TCPRoute *attached* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"TCPRoute","multi":true,"name":"tcproute","query":{"query":"label_values(gatewayapi_tcproute_created, name)","refId":"StandardVariableQuery"},"regex":"/(.*)/","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / TCPRoutes","uid":"gatewayapitcproutes"} diff --git a/config/examples/dashboards/tlsroutes.json b/config/examples/dashboards/tlsroutes.json index 0a11c31..2a5c1a1 100644 --- a/config/examples/dashboards/tlsroutes.json +++ b/config/examples/dashboards/tlsroutes.json @@ -1,1004 +1,679 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "TLSRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of TLSRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "TLSRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tlsroute_created{name=~\"${tlsroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by TLSRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of TLSRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tlsroute_created{name=~\"${tlsroute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by TLSRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_created{name=~\"${tlsroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_created{name=~\"${tlsroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" + ], + "title": "TLSRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } }, - "mode": "binary", - "reduce": { - "reducer": "sum" + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 + ], + "type": "table" }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true + ], + "title": "TLSRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to TLSRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to TLSRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 + ], + "title": "TLSRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_tlsroute_created, name)", - "hide": 0, - "includeAll": true, - "label": "TLSRoute", - "multi": true, - "name": "tlsroute", - "options": [], - "query": { - "query": "label_values(gatewayapi_tlsroute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / TLSRoutes", - "uid": "gatewayapitlsroutes", - "version": 3, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "TLSRoute", + "multi": true, + "name": "tlsroute", + "query": { + "query": "label_values(gatewayapi_tlsroute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / TLSRoutes", + "uid": "gatewayapitlsroutes" +} diff --git a/config/examples/dashboards/tlsroutes.yaml b/config/examples/dashboards/tlsroutes.yaml new file mode 100644 index 0000000..a6ef0c5 --- /dev/null +++ b/config/examples/dashboards/tlsroutes.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: tlsroutes +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"TLSRoutes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of TLSRoutes across all namespaces","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_tlsroute_created{name=~\"${tlsroute}\"})","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) targeted by TLSRoutes","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"})","instant":true}],"title":"Tar. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tlsroute_created{name=~\"${tlsroute}\"}","format":"table","instant":true,"range":false}],"title":"TLSRoutes","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"}","format":"table","instant":true,"range":false}],"title":"TLSRoute *targeted* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) attached to TLSRoutes","gridPos":{"h":3,"w":2,"x":0,"y":4},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"})","instant":true}],"title":"Att. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":7},"id":7,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"}","format":"table","instant":true,"range":false}],"title":"TLSRoute *attached* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"TLSRoute","multi":true,"name":"tlsroute","query":{"query":"label_values(gatewayapi_tlsroute_created, name)","refId":"StandardVariableQuery"},"regex":"/(.*)/","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / TLSRoutes","uid":"gatewayapitlsroutes"} diff --git a/config/examples/dashboards/udproutes.json b/config/examples/dashboards/udproutes.json index 0760cb3..a315e82 100644 --- a/config/examples/dashboards/udproutes.json +++ b/config/examples/dashboards/udproutes.json @@ -1,1004 +1,679 @@ { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "UDPRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of UDPRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "UDPRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_udproute_created{name=~\"${udproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by UDPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of UDPRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_udproute_created{name=~\"${udproute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_udproute_parent_info{name=~\"${udproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by UDPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_udproute_parent_info{name=~\"${udproute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_created{name=~\"${udproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_created{name=~\"${udproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" + ], + "title": "UDPRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } }, - "mode": "binary", - "reduce": { - "reducer": "sum" + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 + ], + "type": "table" }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_parent_info{name=~\"${udproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_parent_info{name=~\"${udproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true + ], + "title": "UDPRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "udp_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "udp_mode": "UDP Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to UDPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to UDPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "udp_mode": 8 + ], + "title": "UDPRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "udp_mode": "UDP Mode", - "type": "Address Type", - "value": "Address Value" + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_udproute_created, name)", - "hide": 0, - "includeAll": true, - "label": "UDPRoute", - "multi": true, - "name": "udproute", - "options": [], - "query": { - "query": "label_values(gatewayapi_udproute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / UDPRoutes", - "uid": "gatewayapiudproutes", - "version": 3, - "weekStart": "" -} \ No newline at end of file + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "UDPRoute", + "multi": true, + "name": "udproute", + "query": { + "query": "label_values(gatewayapi_udproute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / UDPRoutes", + "uid": "gatewayapiudproutes" +} diff --git a/config/examples/dashboards/udproutes.yaml b/config/examples/dashboards/udproutes.yaml new file mode 100644 index 0000000..28f7538 --- /dev/null +++ b/config/examples/dashboards/udproutes.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: udproutes +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + {"editable":false,"links":[{"asDropdown":false,"includeVars":true,"keepTime":true,"tags":["gateway-api-state"],"targetBlank":false,"title":"Gateway Dashboards","type":"dashboards"}],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":1,"title":"UDPRoutes","type":"row"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of UDPRoutes across all namespaces","gridPos":{"h":3,"w":2,"x":0,"y":1},"id":2,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_udproute_created{name=~\"${udproute}\"})","instant":true}],"title":"Total","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) targeted by UDPRoutes","gridPos":{"h":3,"w":2,"x":2,"y":1},"id":3,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_udproute_parent_info{name=~\"${udproute}\"})","instant":true}],"title":"Tar. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":1},"id":4,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_udproute_created{name=~\"${udproute}\"}","format":"table","instant":true,"range":false}],"title":"UDPRoutes","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","Value"]}}},{"id":"calculateField","options":{"alias":"Created At","binary":{"left":"Value","operator":"*","reducer":"sum","right":"1000"},"mode":"binary","reduce":{"reducer":"sum"},"replaceFields":false}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{},"renameByName":{"Value":"Created","customresource_kind":"Kind","customresource_version":"Version","name":"Name","namespace":"Namespace"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":14,"y":1},"id":5,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_udproute_parent_info{name=~\"${udproute}\"}","format":"table","instant":true,"range":false}],"title":"UDPRoute *targeted* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"},{"datasource":{"type":"prometheus","uid":"$datasource"},"description":"Total number of parents (e.g. Gateways) attached to UDPRoutes","gridPos":{"h":3,"w":2,"x":0,"y":4},"id":6,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"count(gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"})","instant":true}],"title":"Att. Parents","type":"stat"},{"datasource":{"type":"prometheus","uid":"$datasource"},"fieldConfig":{"overrides":[{"matcher":{"id":"byName","options":"Created At"},"properties":[{"id":"unit","value":"dateTimeAsIso"}]},{"matcher":{"id":"byName","options":"Kind"},"properties":[{"id":"custom.width","value":"108"}]},{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":"85"}]},{"matcher":{"id":"byName","options":"Listener Name"},"properties":[{"id":"custom.width","value":"119"}]},{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"custom.width","value":"163"}]},{"matcher":{"id":"byName","options":"Port"},"properties":[{"id":"custom.width","value":"59"}]},{"matcher":{"id":"byName","options":"Protocol"},"properties":[{"id":"custom.width","value":"104"}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.width","value":"98"}]},{"matcher":{"id":"byName","options":"Parent Kind"},"properties":[{"id":"custom.width","value":"103"}]},{"matcher":{"id":"byName","options":"Parent Name"},"properties":[{"id":"custom.width","value":"118"}]},{"matcher":{"id":"byName","options":"Namespace"},"properties":[{"id":"custom.width","value":"124"}]}]},"gridPos":{"h":6,"w":10,"x":4,"y":7},"id":7,"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"}","format":"table","instant":true,"range":false}],"title":"UDPRoute *attached* Parent References","transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["customresource_version","name","namespace","parent_kind","parent_name","parent_namespace"]}}},{"id":"organize","options":{"excludeByName":{"Value":true},"indexByName":{"Value":9,"customresource_kind":0,"customresource_version":1,"hostname":5,"listener_name":4,"name":2,"namespace":3,"port":6,"protocol":7,"tls_mode":8},"renameByName":{"Value":"","customresource_kind":"Kind","customresource_version":"Version","hostname":"Hostname","listener_name":"Listener Name","name":"Name","namespace":"Namespace","parent_kind":"Parent Kind","parent_name":"Parent Name","parent_namespace":"Parent Namespace","port":"Port","prometheus":"","protocol":"Protocol","tls_mode":"TLS Mode","type":"Address Type","value":"Address Value"}}}],"type":"table"}],"schemaVersion":36,"style":"dark","tags":["gateway-api","gateway-api-state"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"includeAll":true,"label":"UDPRoute","multi":true,"name":"udproute","query":{"query":"label_values(gatewayapi_udproute_created, name)","refId":"StandardVariableQuery"},"regex":"/(.*)/","type":"query"}]},"time":{"from":"now-1h","to":"now"},"timezone":"utc","title":"Gateway API State / UDPRoutes","uid":"gatewayapiudproutes"} diff --git a/config/examples/kube-prometheus/bundle.yaml b/config/examples/kube-prometheus/bundle.yaml index a2c4c30..31da0c3 100644 --- a/config/examples/kube-prometheus/bundle.yaml +++ b/config/examples/kube-prometheus/bundle.yaml @@ -37879,7850 +37879,5232 @@ metadata: --- apiVersion: v1 data: - gatewayclasses.json: |- + gatewayclasses.json: | { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1694697359281, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 14, - "panels": [], - "title": "Gateway Classes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of GatewayClasses across all clusters", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "Gateway Classes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gatewayclass_info)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total GatewayClasses with an Accepted state of True", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of GatewayClasses across all clusters", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gatewayclass_info)", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Accepted", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total GatewayClasses with an Accepted state of True", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gatewayclass_status{type=\"Accepted\"} > 0)", + "instant": true + } + ], + "title": "Accepted", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gatewayclass_created", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GatewayClasses", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "Value" - ] - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true, - "customresource_kind": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Gateway Details", - "url": "/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gatewayclass_created", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "GatewayClasses", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "Value" + ] } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 10, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true, + "customresource_kind": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_info", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateways (by GatewayClass)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "gatewayclass_name", - "name", - "namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Gateway Details", + "url": "/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}" + } + ] + }, + { + "id": "custom.displayMode", + "value": "color-text" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_info", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false, - "customresource_kind": true - }, - "indexByName": { - "Value": 3, - "gatewayclass_name": 2, - "name": 0, - "namespace": 1 - }, - "renameByName": { - "Value": "# Instances", - "customresource_kind": "Kind", - "customresource_version": "Version", - "gatewayclass_name": "GatewayClass", - "name": "Name", - "namespace": "Namespace" + ], + "title": "Gateways (by GatewayClass)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "gatewayclass_name", + "name", + "namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false, + "customresource_kind": true + }, + "indexByName": { + "Value": 3, + "gatewayclass_name": 2, + "name": 0, + "namespace": 1 + }, + "renameByName": { + "Value": "# Instances", + "customresource_kind": "Kind", + "customresource_version": "Version", + "gatewayclass_name": "GatewayClass", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "custom.width", - "value": 333 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 20, - "x": 4, - "y": 7 - }, - "id": 33, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Supported Features (by GatewayClass)", - "transformations": [ - { - "id": "reduce", - "options": { - "includeTimeField": false, - "labelsToFields": true, - "mode": "seriesToRows", - "reducers": [ - "last" + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "custom.width", + "value": 333 + } + ] + } ] - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "features", - "name" - ] - } - } - }, - { - "id": "groupBy", - "options": { - "fields": { - "features": { - "aggregations": [ - "allValues" - ], - "operation": "aggregate" - }, - "name": { - "aggregations": [], - "operation": "groupby" - } + }, + "gridPos": { + "h": 6, + "w": 20, + "x": 4, + "y": 7 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gatewayclass_status_supported_features{name=\"$gatewayclass\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "features (allValues)": "Features", - "name": "GatewayClass" + ], + "title": "Supported Features (by GatewayClass)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "features", + "name" + ] + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "features": { + "aggregations": [ + "allValues" + ], + "operation": "aggregate" + }, + "name": { + "aggregations": [ ], + "operation": "groupby" + } + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { }, + "indexByName": { }, + "renameByName": { + "features (allValues)": "Features", + "name": "GatewayClass" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": { - "selected": true, - "text": "istio", - "value": "istio" - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_gatewayclass_info, name)", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "gatewayclass", - "options": [], - "query": { - "query": "label_values(gatewayapi_gatewayclass_info, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / GatewayClasses", - "uid": "gatewayapigatewayclass", - "version": 1, - "weekStart": "" + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "GatewayClass", + "multi": true, + "name": "gatewayclass", + "query": { + "query": "label_values(gatewayapi_gatewayclass_info, name)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / GatewayClasses", + "uid": "gatewayapigatewayclass" } kind: ConfigMap metadata: - name: grafana-gatewayclasses-d8d6fd4fd8 + name: grafana-gatewayclasses-g4g48gkf6k namespace: monitoring --- apiVersion: v1 data: - gateways.json: |- + gateways.json: | { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1694614167005, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "title": "Gateways", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of Gateways across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 21, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "Gateways", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_info{name=~\"$gateway\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Number of Gateways not in an Accepted and Programmed state", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of Gateways across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_info{name=~\"$gateway\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count((gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} == 0) or (gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} == 0)) or vector(0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Unhealthy", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 125 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Number of Gateways not in an Accepted and Programmed state", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count((gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} == 0) or (gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} == 0)) or vector(0)", + "instant": true + } + ], + "title": "Unhealthy", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_created{name=~\"$gateway\"} * on(name, namespace, instance) group_right gatewayapi_gateway_info{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateways", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "gatewayclass_name", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "125" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_created{name=~\"$gateway\"} * on(name, namespace, instance) group_right gatewayapi_gateway_info{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true, - "customresource_kind": true - }, - "indexByName": { - "Created At": 6, - "Value": 5, - "customresource_kind": 0, - "customresource_version": 1, - "gatewayclass_name": 4, - "name": 2, - "namespace": 3 - }, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "gatewayclass_name": "GatewayClass", - "name": "Name", - "namespace": "Namespace" + ], + "title": "Gateways", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "gatewayclass_name", + "name", + "namespace", + "Value" + ] + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true, + "customresource_kind": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "gatewayclass_name": "GatewayClass", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 94 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 112 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 77 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 91 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 5, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_listener_info{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateway Listeners", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "hostname", - "listener_name", - "name", - "namespace", - "port", - "protocol", - "tls_mode", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "94" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "112" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "77" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "91" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_listener_info{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + ], + "title": "Gateway Listeners", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "hostname", + "listener_name", + "name", + "namespace", + "port", + "protocol", + "tls_mode", + "Value" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total Gateways with an Accepted state of True", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} > 0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Accepted", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total Gateways with a Programmed state of True", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 4 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total Gateways with an Accepted state of True", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} > 0)", + "instant": true + } + ], + "title": "Accepted", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} > 0)", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Programmed", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of listeners across all Gateways", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 7 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total Gateways with a Programmed state of True", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 4 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} > 0)", + "instant": true + } + ], + "title": "Programmed", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_gateway_listener_info{name=~\"$gateway\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Listeners", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of attached routes across all listeners", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 7 - }, - "id": 25, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of listeners across all Gateways", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 7 + }, + "id": 8, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_gateway_listener_info{name=~\"$gateway\"})", + "instant": true + } + ], + "title": "Listeners", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Routes", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 94 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 136 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 9, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of attached routes across all listeners", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 7 + }, + "id": 9, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"})", + "instant": true + } + ], + "title": "Att. Routes", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_status_address_info{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateway Status Addresses", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "type", - "value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "94" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "136" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 10, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_status_address_info{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "Gateway Status Addresses", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "type", + "value" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 88 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 113 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 167 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# Attached Routes" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 7 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "Gateway Listener Status - Attached Routes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "listener_name", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "113" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "88" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "167" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "167" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "# Attached Routes" + }, + "properties": [ + { + "id": "custom.width", + "value": "137" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 7 + }, + "id": 11, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_gateway_status_listener_attached_routes{name=~\"$gateway\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + ], + "title": "Gateway Listener Status - Attached Routes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "listener_name", + "name", + "namespace", + "Value" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "HTTPRoute Details", + "url": "/d/gatewayapihttproutes/gateway-api-state-httproutes?var-httproute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "HTTPRoute Details", - "url": "/d/gatewayapihttproutes/gateway-api-state-httproutes?var-httproute=${__value.text}" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 13 + }, + "id": 12, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "HTTPRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 13 - }, - "id": 31, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "GRPCRoute Details", + "url": "/d/gatewayapigrpcroutes/gateway-api-state-grpcroutes?var-grpcroute=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 13 + }, + "id": 13, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + ], + "title": "GRPCRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "TLSRoute Details", + "url": "/d/gatewayapitlsroutes/gateway-api-state-tlsroutes?var-tlsroute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "GRPCRoute Details", - "url": "/d/gatewayapigrpcroutes/gateway-api-state-grpcroutes?var-grpcroute=${__value.text}" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 19 + }, + "id": 14, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "TLSRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 13 - }, - "id": 32, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "TCPRoute Details", + "url": "/d/gatewayapitcproutes/gateway-api-state-tcproutes?var-tcproute=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 19 + }, + "id": 15, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + ], + "title": "TCPRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "links", + "value": [ + { + "title": "UDPRoute Details", + "url": "/d/gatewayapiudproutes/gateway-api-state-udproutes?var-udproute=${__value.text}" + } + ] + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "TLSRoute Details", - "url": "/d/gatewayapitlsroutes/gateway-api-state-tlsroutes?var-tlsroute=${__value.text}" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 25 + }, + "id": 16, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "UDPRoutes (by Gateway)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "namespace", + "parent_name" + ] } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 19 - }, - "id": 35, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "# Attached Routes", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "", + "parent_name": "Gateway", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode" + } + } + } + ], + "type": "table" + } + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "Gateway", + "multi": true, + "name": "gateway", + "query": { + "query": "label_values(gatewayapi_gateway_info, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / Gateways", + "uid": "gatewayapigateways" + } +kind: ConfigMap +metadata: + name: grafana-gateways-6465t79fc4 + namespace: monitoring + +--- +apiVersion: v1 +data: + grpcroutes.json: | + { + "editable": false, + "links": [ + { + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "GRPCRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + }, + "description": "Total number of GRPCRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_grpcroute_created{name=~\"${grpcroute}\"})", + "instant": true } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "TCPRoute Details", - "url": "/d/gatewayapitcproutes/gateway-api-state-tcproutes?var-tcproute=${__value.text}" - } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] + ], + "title": "Total", + "type": "stat" }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 19 - }, - "id": 33, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + }, + "description": "Total number of parents (e.g. Gateways) targeted by GRPCRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"})", + "instant": true } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "title": "Tar. Parents", + "type": "stat" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "UCPRoute Details", - "url": "/d/gatewayapiudproutes/gateway-api-state-udproutes?var-udproute=${__value.text}" + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_created{name=~\"${grpcroute}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "GRPCRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] } - ] - }, - { - "id": "custom.displayMode", - "value": "color-text" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 25 - }, - "id": 34, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } + } + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_parent_info{parent_kind=\"Gateway\",parent_name=~\"${gateway}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoutes (by Gateway)", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "name", - "namespace", - "parent_name" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "# Attached Routes", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "", - "parent_name": "Gateway", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode" + ], + "title": "GRPCRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ + ], + "type": "table" + }, { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Total number of parents (e.g. Gateways) attached to GRPCRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_gateway_info, name)", - "hide": 0, - "includeAll": true, - "label": "Gateway", - "multi": true, - "name": "gateway", - "options": [], - "query": { - "query": "label_values(gatewayapi_gateway_info, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"}", + "format": "table", + "instant": true, + "range": false + } + ], + "title": "GRPCRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } + } + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / Gateways", - "uid": "gatewayapigateways", - "version": 3, - "weekStart": "" + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "GRPCRoute", + "multi": true, + "name": "grpcroute", + "query": { + "query": "label_values(gatewayapi_grpcroute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / GRPCRoutes", + "uid": "gatewayapigrpcroutes" } kind: ConfigMap metadata: - name: grafana-gateways-k49b97kmbg + name: grafana-grpcroutes-8h9h7bc994 namespace: monitoring --- apiVersion: v1 data: - grpcroutes.json: |- + httproutes.json: | { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "GRPCRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of GRPCRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "HTTPRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_grpcroute_created{name=~\"${grpcroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by GRPCRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of HTTPRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_httproute_created{name=~\"${httproute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by HTTPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_httproute_parent_info{name=~\"${httproute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_created{name=~\"${grpcroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_created{name=~\"${httproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + ], + "title": "HTTPRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 + ], + "type": "table" }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_parent_info{name=~\"${grpcroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_parent_info{name=~\"${httproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "HTTPRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to GRPCRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "type": "table" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to HTTPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "GRPCRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "HTTPRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_grpcroute_created, name)", - "hide": 0, - "includeAll": true, - "label": "GRPCRoute", - "multi": true, - "name": "grpcroute", - "options": [], - "query": { - "query": "label_values(gatewayapi_grpcroute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / GRPCRoutes", - "uid": "gatewayapigrpcroutes", - "version": 3, - "weekStart": "" + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "HTTPRoute", + "multi": true, + "name": "httproute", + "query": { + "query": "label_values(gatewayapi_httproute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / HTTPRoutes", + "uid": "gatewayapihttproutes" } kind: ConfigMap metadata: - name: grafana-grpcroutes-6925t54448 + name: grafana-httproutes-mhg79c4bbk namespace: monitoring --- apiVersion: v1 data: - httproutes.json: |- + tcproutes.json: | { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "HTTPRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of HTTPRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "TCPRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_httproute_created{name=~\"${httproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by HTTPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of TCPRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tcproute_created{name=~\"${tcproute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_httproute_parent_info{name=~\"${httproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by TCPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_created{name=~\"${httproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_created{name=~\"${tcproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + ], + "title": "TCPRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_parent_info{name=~\"${httproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "TCPRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to HTTPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ], + "type": "table" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + }, + "description": "Total number of parents (e.g. Gateways) attached to TCPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "HTTPRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "TCPRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_httproute_created, name)", - "hide": 0, - "includeAll": true, - "label": "HTTPRoute", - "multi": true, - "name": "httproute", - "options": [], - "query": { - "query": "label_values(gatewayapi_httproute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / HTTPRoutes", - "uid": "gatewayapihttproutes", - "version": 3, - "weekStart": "" + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "TCPRoute", + "multi": true, + "name": "tcproute", + "query": { + "query": "label_values(gatewayapi_tcproute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / TCPRoutes", + "uid": "gatewayapitcproutes" } kind: ConfigMap metadata: - name: grafana-httproutes-g8ckm98t85 + name: grafana-tcproutes-d7tt7t272g namespace: monitoring --- apiVersion: v1 data: - tcproutes.json: |- + tlsroutes.json: | { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "TCPRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of TCPRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tcproute_created{name=~\"${tcproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by TCPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "TLSRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_created{name=~\"${tcproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + }, + "description": "Total number of TLSRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tlsroute_created{name=~\"${tlsroute}\"})", + "instant": true } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_parent_info{name=~\"${tcproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tcp_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tcp_mode": "TCP Mode", - "type": "Address Type", - "value": "Address Value" + }, + "description": "Total number of parents (e.g. Gateways) targeted by TLSRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"})", + "instant": true } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to TCPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 + ], + "title": "Tar. Parents", + "type": "stat" }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TCPRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_created{name=~\"${tlsroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tcp_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tcp_mode": "TCP Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "TLSRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" + ], + "type": "table" }, { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_tcproute_created, name)", - "hide": 0, - "includeAll": true, - "label": "TCPRoute", - "multi": true, - "name": "tcproute", - "options": [], - "query": { - "query": "label_values(gatewayapi_tcproute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / TCPRoutes", - "uid": "gatewayapitcproutes", - "version": 3, - "weekStart": "" - } -kind: ConfigMap -metadata: - name: grafana-tcproutes-mfgd9ctmh2 - namespace: monitoring - ---- -apiVersion: v1 -data: - tlsroutes.json: |- - { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "TLSRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of TLSRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tlsroute_created{name=~\"${tlsroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by TLSRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_created{name=~\"${tlsroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + ], + "title": "TLSRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_parent_info{name=~\"${tlsroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + }, + "description": "Total number of parents (e.g. Gateways) attached to TLSRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"})", + "instant": true } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) attached to TLSRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] + ], + "title": "Att. Parents", + "type": "stat" }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "TLSRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "tls_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "tls_mode": "TLS Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "TLSRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_tlsroute_created, name)", - "hide": 0, - "includeAll": true, - "label": "TLSRoute", - "multi": true, - "name": "tlsroute", - "options": [], - "query": { - "query": "label_values(gatewayapi_tlsroute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / TLSRoutes", - "uid": "gatewayapitlsroutes", - "version": 3, - "weekStart": "" + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "TLSRoute", + "multi": true, + "name": "tlsroute", + "query": { + "query": "label_values(gatewayapi_tlsroute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / TLSRoutes", + "uid": "gatewayapitlsroutes" } kind: ConfigMap metadata: - name: grafana-tlsroutes-66kkf8cdg2 + name: grafana-tlsroutes-fg5726f7k9 namespace: monitoring --- apiVersion: v1 data: - udproutes.json: |- + udproutes.json: | { - "__inputs": [], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ + "editable": false, + "links": [ { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - }, - {} - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1692886893094, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [ - "gateway-api-state" - ], - "targetBlank": false, - "title": "Gateway Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "title": "UDPRoutes", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of UDPRoutes across all namespaces", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 1 - }, - "id": 27, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "asDropdown": false, + "includeVars": true, + "keepTime": true, + "tags": [ + "gateway-api-state" + ], + "targetBlank": false, + "title": "Gateway Dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "title": "UDPRoutes", + "type": "row" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_udproute_created{name=~\"${udproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Total", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Total number of parents (e.g. Gateways) targeted by UDPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 2, - "y": 1 - }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + }, + "description": "Total number of UDPRoutes across all namespaces", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_udproute_created{name=~\"${udproute}\"})", + "instant": true + } + ], + "title": "Total", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_udproute_parent_info{name=~\"${udproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Tar. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 1 - }, - "id": 3, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + }, + "description": "Total number of parents (e.g. Gateways) targeted by UDPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 1 + }, + "id": 3, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_udproute_parent_info{name=~\"${udproute}\"})", + "instant": true + } + ], + "title": "Tar. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_created{name=~\"${udproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoutes", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "Value" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 1 + }, + "id": 4, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_created{name=~\"${udproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "calculateField", - "options": { - "alias": "Created At", - "binary": { - "left": "Value", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Created", - "customresource_kind": "Kind", - "customresource_version": "Version", - "name": "Name", - "namespace": "Namespace" + ], + "title": "UDPRoutes", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "Value" + ] + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Created At", + "binary": { + "left": "Value", + "operator": "*", + "reducer": "sum", + "right": "1000" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { }, + "renameByName": { + "Value": "Created", + "customresource_kind": "Kind", + "customresource_version": "Version", + "name": "Name", + "namespace": "Namespace" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] + ], + "type": "table" }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 1 - }, - "id": 11, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_parent_info{name=~\"${udproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoute *targeted* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 5, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_parent_info{name=~\"${udproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "udp_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "udp_mode": "UDP Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "UDPRoute *targeted* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + ], + "type": "table" }, - "description": "Total number of parents (e.g. Gateways) attached to UDPRoutes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 2, - "x": 0, - "y": 4 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"})", - "instant": true, - "range": false, - "refId": "A" - } - ], - "title": "Att. Parents", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Created At" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsIso" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 108 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Version" - }, - "properties": [ - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Listener Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 119 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Hostname" - }, - "properties": [ - { - "id": "custom.width", - "value": 163 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Port" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Protocol" - }, - "properties": [ - { - "id": "custom.width", - "value": 104 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 98 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Kind" - }, - "properties": [ - { - "id": "custom.width", - "value": 103 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Parent Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 124 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 4, - "y": 7 - }, - "id": 12, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [] + }, + "description": "Total number of parents (e.g. Gateways) attached to UDPRoutes", + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 6, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "count(gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"})", + "instant": true + } + ], + "title": "Att. Parents", + "type": "stat" }, - "pluginVersion": "8.5.5", - "targets": [ - { - "datasource": { + { + "datasource": { "type": "prometheus", "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"}", - "format": "table", - "instant": true, - "legendFormat": "", - "range": false, - "refId": "A" - } - ], - "title": "UDPRoute *attached* Parent References", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "customresource_version", - "name", - "namespace", - "parent_kind", - "parent_name", - "parent_namespace" - ] + }, + "fieldConfig": { + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Created At" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsIso" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "108" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Version" + }, + "properties": [ + { + "id": "custom.width", + "value": "85" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Listener Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "119" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": "163" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Port" + }, + "properties": [ + { + "id": "custom.width", + "value": "59" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Protocol" + }, + "properties": [ + { + "id": "custom.width", + "value": "104" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "98" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": "103" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Parent Name" + }, + "properties": [ + { + "id": "custom.width", + "value": "118" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": "124" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 4, + "y": 7 + }, + "id": 7, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"}", + "format": "table", + "instant": true, + "range": false } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": true - }, - "indexByName": { - "Value": 9, - "customresource_kind": 0, - "customresource_version": 1, - "hostname": 5, - "listener_name": 4, - "name": 2, - "namespace": 3, - "port": 6, - "protocol": 7, - "udp_mode": 8 - }, - "renameByName": { - "Value": "", - "customresource_kind": "Kind", - "customresource_version": "Version", - "hostname": "Hostname", - "listener_name": "Listener Name", - "name": "Name", - "namespace": "Namespace", - "parent_kind": "Parent Kind", - "parent_name": "Parent Name", - "parent_namespace": "Parent Namespace", - "port": "Port", - "prometheus": "", - "protocol": "Protocol", - "udp_mode": "UDP Mode", - "type": "Address Type", - "value": "Address Value" + ], + "title": "UDPRoute *attached* Parent References", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "customresource_version", + "name", + "namespace", + "parent_kind", + "parent_name", + "parent_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Value": true + }, + "indexByName": { + "Value": 9, + "customresource_kind": 0, + "customresource_version": 1, + "hostname": 5, + "listener_name": 4, + "name": 2, + "namespace": 3, + "port": 6, + "protocol": 7, + "tls_mode": 8 + }, + "renameByName": { + "Value": "", + "customresource_kind": "Kind", + "customresource_version": "Version", + "hostname": "Hostname", + "listener_name": "Listener Name", + "name": "Name", + "namespace": "Namespace", + "parent_kind": "Parent Kind", + "parent_name": "Parent Name", + "parent_namespace": "Parent Namespace", + "port": "Port", + "prometheus": "", + "protocol": "Protocol", + "tls_mode": "TLS Mode", + "type": "Address Type", + "value": "Address Value" + } + } } - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [ - "gateway-api", - "gateway-api-state" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "prometheus", - "value": "prometheus" - }, - "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(gatewayapi_udproute_created, name)", - "hide": 0, - "includeAll": true, - "label": "UDPRoute", - "multi": true, - "name": "udproute", - "options": [], - "query": { - "query": "label_values(gatewayapi_udproute_created, name)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/(.*)/", - "skipUrlSync": false, - "sort": 1, - "type": "query" + ], + "type": "table" } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Gateway API State / UDPRoutes", - "uid": "gatewayapiudproutes", - "version": 3, - "weekStart": "" + ], + "schemaVersion": 36, + "style": "dark", + "tags": [ + "gateway-api", + "gateway-api-state" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "includeAll": true, + "label": "UDPRoute", + "multi": true, + "name": "udproute", + "query": { + "query": "label_values(gatewayapi_udproute_created, name)", + "refId": "StandardVariableQuery" + }, + "regex": "/(.*)/", + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "utc", + "title": "Gateway API State / UDPRoutes", + "uid": "gatewayapiudproutes" } kind: ConfigMap metadata: - name: grafana-udproutes-64f4b97tfh + name: grafana-udproutes-k2h47ctcdg namespace: monitoring --- @@ -46391,31 +43773,31 @@ spec: secretName: grafana-config - configMap: defaultMode: 420 - name: grafana-gatewayclasses-d8d6fd4fd8 + name: grafana-gatewayclasses-g4g48gkf6k name: grafana-gatewayclasses - configMap: defaultMode: 420 - name: grafana-gateways-k49b97kmbg + name: grafana-gateways-6465t79fc4 name: grafana-gateways - configMap: defaultMode: 420 - name: grafana-httproutes-g8ckm98t85 + name: grafana-httproutes-mhg79c4bbk name: grafana-httproutes - configMap: defaultMode: 420 - name: grafana-grpcroutes-6925t54448 + name: grafana-grpcroutes-8h9h7bc994 name: grafana-grpcroutes - configMap: defaultMode: 420 - name: grafana-tlsroutes-66kkf8cdg2 + name: grafana-tlsroutes-fg5726f7k9 name: grafana-tlsroutes - configMap: defaultMode: 420 - name: grafana-tcproutes-mfgd9ctmh2 + name: grafana-tcproutes-d7tt7t272g name: grafana-tcproutes - configMap: defaultMode: 420 - name: grafana-udproutes-64f4b97tfh + name: grafana-udproutes-k2h47ctcdg name: grafana-udproutes --- diff --git a/hack/local_dev.sh b/hack/local_dev.sh new file mode 100755 index 0000000..ebecb40 --- /dev/null +++ b/hack/local_dev.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +set -e + +echo "Creating kind cluster" +kind create cluster + +echo "Setting up monitoring stack" +kubectl create -f ./config/gateway-api/crd/standard/ +kubectl create -f ./config/examples/enterprise/all.yaml +kubectl replace --subresource=status -f ./config/examples/enterprise/all.yaml +kubectl apply --server-side -f ./config/examples/kube-prometheus/bundle_crd.yaml +kubectl apply -f ./config/examples/kube-prometheus/bundle.yaml + +echo "Installing grafana-operator" +helm upgrade -i grafana-operator oci://ghcr.io/grafana-operator/helm-charts/grafana-operator --version v5.4.1 + +kubectl apply -f - < /dev/null & + +echo -e "\n\nOpen Grafana at http://localhost:3000 to see dashboards. (user/pass admin/admin)\n\n" + +make apply-latest-dashboard-crs + +echo -e "\nStarting to watch for jsonnet changes in src/dasbhoards\n\n" + +fswatch -r src/dashboards/ | xargs -n 1 -I {} make apply-latest-dashboard-crs diff --git a/jsonnetfile.json b/jsonnetfile.json new file mode 100644 index 0000000..9af8e59 --- /dev/null +++ b/jsonnetfile.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "dependencies": [ + { + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet", + "subdir": "gen/grafonnet-latest" + } + }, + "version": "main" + } + ], + "legacyImports": true +} diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json new file mode 100644 index 0000000..d13e593 --- /dev/null +++ b/jsonnetfile.lock.json @@ -0,0 +1,46 @@ +{ + "version": 1, + "dependencies": [ + { + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet", + "subdir": "gen/grafonnet-latest" + } + }, + "version": "f40876da40d787e9c288de0b547ac85597c781d9", + "sum": "sVzVlSLbxPkAurwO19YERigLMmRfVsViMcWC0gkTTqU=" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet", + "subdir": "gen/grafonnet-v10.0.0" + } + }, + "version": "f40876da40d787e9c288de0b547ac85597c781d9", + "sum": "VHHuBN+bM1v2KtzfsgE7JIXND8fVJTDQlYDWQ4NhG7s=" + }, + { + "source": { + "git": { + "remote": "https://github.com/jsonnet-libs/docsonnet", + "subdir": "doc-util" + } + }, + "version": "220d3e673fe69cad1f68ccbddb6ce2b8ddf76e78", + "sum": "G/xT/ZM9yD1BtopU6DWoANgmu83dDI5LKULMVYAh7R4=" + }, + { + "source": { + "git": { + "remote": "https://github.com/jsonnet-libs/xtd", + "subdir": "" + } + }, + "version": "0256a910ac71f0f842696d7bca0bf01ea77eb654", + "sum": "zBOpb1oTNvXdq9RF6yzTHill5r1YTJLBBoqyx4JYtAg=" + } + ], + "legacyImports": false +} diff --git a/src/dashboards/dashboard_cr_template.yaml b/src/dashboards/dashboard_cr_template.yaml new file mode 100644 index 0000000..c715c5d --- /dev/null +++ b/src/dashboards/dashboard_cr_template.yaml @@ -0,0 +1,10 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: $DASHBOARD_NAME +spec: + instanceSelector: + matchLabels: + dashboards: "grafana" + json: > + \ No newline at end of file diff --git a/src/dashboards/gatewayclasses.jsonnet b/src/dashboards/gatewayclasses.jsonnet new file mode 100644 index 0000000..c50390a --- /dev/null +++ b/src/dashboards/gatewayclasses.jsonnet @@ -0,0 +1,141 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('GatewayClasses', 'gatewayapigatewayclass', [ + var.gateways('gatewayclass', '', 'GatewayClass') +]) ++ g.dashboard.withPanels([ + gwapi.row('Gateway Classes', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of GatewayClasses across all clusters', 'count(gatewayapi_gatewayclass_info)'), + gwapi.stat('Accepted', 3, 2, 2, 1, 'Total GatewayClasses with an Accepted state of True', 'count(gatewayapi_gatewayclass_status{type="Accepted"} > 0)'), + gwapi.table('GatewayClasses', 6, 10, 4, 1, 'gatewayapi_gatewayclass_created') + + var.withOverrides([ + var.overrideNameWithProp('Created At', 'unit', 'dateTimeAsIso') + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'name', + 'Value', + ], + }, + }), + g.panel.table.transformation.withId('calculateField') + + g.panel.table.transformation.withOptions({ + alias: 'Created At', + binary: { + left: 'Value', + operator: '*', + reducer: 'sum', + right: '1000', + }, + mode: 'binary', + reduce: { + reducer: 'sum', + }, + replaceFields: false, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: true, + customresource_kind: true, + }, + indexByName: {}, + renameByName: { + Value: 'Created', + customresource_kind: 'Kind', + customresource_version: 'Version', + name: 'Name', + namespace: 'Namespace', + }, + }), + ]), + gwapi.table('Gateways (by GatewayClass)', 6, 10, 14, 1, 'gatewayapi_gateway_info') + + var.withOverrides([ + var.overrideName('Name') + + var.overrideProp('links', [ + { + title: 'Gateway Details', + url: '/d/gatewayapigateways/gateway-api-state-gateways?var-gateway=${__value.text}', + } + ]) + + var.overrideProp('custom.displayMode', 'color-text') + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'gatewayclass_name', + 'name', + 'namespace', + ], + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: false, + customresource_kind: true, + }, + indexByName: { + Value: 3, + gatewayclass_name: 2, + name: 0, + namespace: 1, + }, + renameByName: { + Value: '# Instances', + customresource_kind: 'Kind', + customresource_version: 'Version', + gatewayclass_name: 'GatewayClass', + name: 'Name', + namespace: 'Namespace', + }, + }), + ]), + gwapi.table('Supported Features (by GatewayClass)', 6, 20, 4, 7, 'gatewayapi_gatewayclass_status_supported_features{name="$gatewayclass"}') + + var.withOverrides([ + var.overrideNameWithProp('name', 'custom.width', 333) + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'features', + 'name', + ], + }, + }), + g.panel.table.transformation.withId('groupBy') + + g.panel.table.transformation.withOptions({ + fields: { + features: { + aggregations: [ + 'allValues', + ], + operation: 'aggregate', + }, + name: { + aggregations: [], + operation: 'groupby', + }, + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: {}, + indexByName: {}, + renameByName: { + 'features (allValues)': 'Features', + name: 'GatewayClass', + }, + }), + ]), +]) diff --git a/src/dashboards/gateways.jsonnet b/src/dashboards/gateways.jsonnet new file mode 100644 index 0000000..a1d4924 --- /dev/null +++ b/src/dashboards/gateways.jsonnet @@ -0,0 +1,254 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('Gateways', 'gatewayapigateways', [ + var.gateways('gateway', '/(.*)/', 'Gateway') +]) ++ g.dashboard.withPanels([ + gwapi.row('Gateways', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of Gateways across all namespaces', 'count(gatewayapi_gateway_info{name=~"$gateway"})'), + gwapi.stat('Unhealthy', 3, 2, 2, 1, 'Number of Gateways not in an Accepted and Programmed state', 'count((gatewayapi_gateway_status{name=~"$gateway",type="Accepted"} == 0) or (gatewayapi_gateway_status{name=~"$gateway",type="Programmed"} == 0)) or vector(0)'), + gwapi.table('Gateways', 6, 10, 4, 1, 'gatewayapi_gateway_created{name=~"$gateway"} * on(name, namespace, instance) group_right gatewayapi_gateway_info{name=~"$gateway"}') + + var.withOverrides( + [ + var.overrideNameWithProp('Created At', 'unit', 'dateTimeAsIso'), + var.overrideNameWithProp('Kind', 'custom.width', '108'), + var.overrideNameWithProp('Version', 'custom.width', '98'), + var.overrideNameWithProp('Name', 'custom.width', '125'), + ], + ) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'gatewayclass_name', + 'name', + 'namespace', + 'Value', + ], + }, + }), + g.panel.table.transformation.withId('calculateField') + + g.panel.table.transformation.withOptions({ + alias: 'Created At', + binary: { + left: 'Value', + operator: '*', + reducer: 'sum', + right: '1000', + }, + mode: 'binary', + reduce: { + reducer: 'sum', + }, + replaceFields: false, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: true, + customresource_kind: true, + }, + indexByName: {}, + renameByName: { + Value: 'Created', + customresource_kind: 'Kind', + customresource_version: 'Version', + gatewayclass_name: 'GatewayClass', + name: 'Name', + namespace: 'Namespace', + }, + }), + ]), + gwapi.table('Gateway Listeners', 6, 10, 14, 1, 'gatewayapi_gateway_listener_info{name=~"$gateway"}') + + var.withOverrides( + [ + var.overrideNameWithProp('Created At', 'unit', 'dateTimeAsIso'), + var.overrideNameWithProp('Kind', 'custom.width', '108'), + var.overrideNameWithProp('Version', 'custom.width', '94'), + var.overrideNameWithProp('Listener Name', 'custom.width', '112'), + var.overrideNameWithProp('Hostname', 'custom.width', '163'), + var.overrideNameWithProp('Port', 'custom.width', '59'), + var.overrideNameWithProp('Protocol', 'custom.width', '77'), + var.overrideNameWithProp('Name', 'custom.width', '91'), + ], + ) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'hostname', + 'listener_name', + 'name', + 'namespace', + 'port', + 'protocol', + 'tls_mode', + 'Value', + ], + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: true, + }, + indexByName: { + Value: 9, + customresource_kind: 0, + customresource_version: 1, + hostname: 5, + listener_name: 4, + name: 2, + namespace: 3, + port: 6, + protocol: 7, + tls_mode: 8, + }, + renameByName: { + Value: '', + customresource_kind: 'Kind', + customresource_version: 'Version', + hostname: 'Hostname', + listener_name: 'Listener Name', + name: 'Name', + namespace: 'Namespace', + port: 'Port', + prometheus: '', + protocol: 'Protocol', + tls_mode: 'TLS Mode', + }, + }), + ]), + gwapi.stat('Accepted', 3, 2, 0, 4, 'Total Gateways with an Accepted state of True', 'count(gatewayapi_gateway_status{name=~"$gateway",type="Accepted"} > 0)'), + gwapi.stat('Programmed', 3, 2, 2, 4, 'Total Gateways with a Programmed state of True', 'count(gatewayapi_gateway_status{name=~"$gateway",type="Programmed"} > 0)'), + gwapi.stat('Listeners', 3, 2, 0, 7, 'Total number of listeners across all Gateways', 'count(gatewayapi_gateway_listener_info{name=~"$gateway"})'), + gwapi.stat('Att. Routes', 3, 2, 2, 7, 'Total number of attached routes across all listeners', 'sum(gatewayapi_gateway_status_listener_attached_routes{name=~"$gateway"})'), + gwapi.table('Gateway Status Addresses', 6, 10, 4, 7, 'gatewayapi_gateway_status_address_info{name=~"$gateway"}') + + var.withOverrides( + [ + var.overrideNameWithProp('Created At', 'unit', 'dateTimeAsIso'), + var.overrideNameWithProp('Kind', 'custom.width', '108'), + var.overrideNameWithProp('Version', 'custom.width', '94'), + var.overrideNameWithProp('Listener Name', 'custom.width', '119'), + var.overrideNameWithProp('Hostname', 'custom.width', '163'), + var.overrideNameWithProp('Port', 'custom.width', '59'), + var.overrideNameWithProp('Protocol', 'custom.width', '104'), + var.overrideNameWithProp('Name', 'custom.width', '136'), + ], + ) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'name', + 'namespace', + 'type', + 'value', + ], + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: true, + }, + indexByName: { + Value: 9, + customresource_kind: 0, + customresource_version: 1, + hostname: 5, + listener_name: 4, + name: 2, + namespace: 3, + port: 6, + protocol: 7, + tls_mode: 8, + }, + renameByName: { + Value: '', + customresource_kind: 'Kind', + customresource_version: 'Version', + hostname: 'Hostname', + listener_name: 'Listener Name', + name: 'Name', + namespace: 'Namespace', + port: 'Port', + prometheus: '', + protocol: 'Protocol', + tls_mode: 'TLS Mode', + type: 'Address Type', + value: 'Address Value', + }, + }), + ]), + gwapi.table('Gateway Listener Status - Attached Routes', 6, 10, 14, 7, 'gatewayapi_gateway_status_listener_attached_routes{name=~"$gateway"}') + + var.withOverrides( + [ + var.overrideNameWithProp('Created At', 'unit', 'dateTimeAsIso'), + var.overrideNameWithProp('Kind', 'custom.width', '113'), + var.overrideNameWithProp('Version', 'custom.width', '88'), + var.overrideNameWithProp('Name', 'custom.width', '167'), + var.overrideNameWithProp('Listener Name', 'custom.width', '167'), + var.overrideNameWithProp('# Attached Routes', 'custom.width', '137'), + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'listener_name', + 'name', + 'namespace', + 'Value', + ], + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: false, + }, + indexByName: { + Value: 9, + customresource_kind: 0, + customresource_version: 1, + hostname: 5, + listener_name: 4, + name: 2, + namespace: 3, + port: 6, + protocol: 7, + tls_mode: 8, + }, + renameByName: { + Value: '# Attached Routes', + customresource_kind: 'Kind', + customresource_version: 'Version', + hostname: 'Hostname', + listener_name: 'Listener Name', + name: 'Name', + namespace: 'Namespace', + port: 'Port', + prometheus: '', + protocol: 'Protocol', + tls_mode: 'TLS Mode', + }, + }), + ]), + + gwapi.tableRouteByGateway('HTTPRoutes (by Gateway)', 6, 10, 4, 13, 'gatewayapi_httproute_parent_info{parent_kind="Gateway",parent_name=~"${gateway}"}', 'HTTPRoute Details', '/d/gatewayapihttproutes/gateway-api-state-httproutes?var-httproute=${__value.text}'), + gwapi.tableRouteByGateway('GRPCRoutes (by Gateway)', 6, 10, 14, 13, 'gatewayapi_grpcroute_parent_info{parent_kind="Gateway",parent_name=~"${gateway}"}', 'GRPCRoute Details', '/d/gatewayapigrpcroutes/gateway-api-state-grpcroutes?var-grpcroute=${__value.text}'), + gwapi.tableRouteByGateway('TLSRoutes (by Gateway)', 6, 10, 4, 19, 'gatewayapi_tlsroute_parent_info{parent_kind="Gateway",parent_name=~"${gateway}"}', 'TLSRoute Details', '/d/gatewayapitlsroutes/gateway-api-state-tlsroutes?var-tlsroute=${__value.text}'), + gwapi.tableRouteByGateway('TCPRoutes (by Gateway)', 6, 10, 14, 19, 'gatewayapi_tcproute_parent_info{parent_kind="Gateway",parent_name=~"${gateway}"}', 'TCPRoute Details', '/d/gatewayapitcproutes/gateway-api-state-tcproutes?var-tcproute=${__value.text}'), + gwapi.tableRouteByGateway('UDPRoutes (by Gateway)', 6, 10, 4, 25, 'gatewayapi_udproute_parent_info{parent_kind="Gateway",parent_name=~"${gateway}"}', 'UDPRoute Details', '/d/gatewayapiudproutes/gateway-api-state-udproutes?var-udproute=${__value.text}'), + +]) diff --git a/src/dashboards/grpcroutes.jsonnet b/src/dashboards/grpcroutes.jsonnet new file mode 100644 index 0000000..d0c28a6 --- /dev/null +++ b/src/dashboards/grpcroutes.jsonnet @@ -0,0 +1,16 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('GRPCRoutes', 'gatewayapigrpcroutes', [ + var.routes('grpcroute', 'GRPCRoute') +]) ++ g.dashboard.withPanels([ + gwapi.row('GRPCRoutes', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of GRPCRoutes across all namespaces', 'count(gatewayapi_grpcroute_created{name=~"${grpcroute}"})'), + gwapi.stat('Tar. Parents', 3, 2, 2, 1, 'Total number of parents (e.g. Gateways) targeted by GRPCRoutes', 'count(gatewayapi_grpcroute_parent_info{name=~"${grpcroute}"})'), + gwapi.routePanel('GRPCRoutes',6,10,4,1,'gatewayapi_grpcroute_created{name=~"${grpcroute}"}'), + gwapi.routePanelReferences('GRPCRoute *targeted* Parent References', 6, 10, 14, 1, 'gatewayapi_grpcroute_parent_info{name=~"${grpcroute}"}'), + gwapi.stat('Att. Parents', 3, 2, 0, 4, 'Total number of parents (e.g. Gateways) attached to GRPCRoutes', 'count(gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"})'), + gwapi.routePanelReferences('GRPCRoute *attached* Parent References', 6, 10, 4, 7, 'gatewayapi_grpcroute_status_parent_info{name=~\"${grpcroute}\"}') +]) \ No newline at end of file diff --git a/src/dashboards/httproutes.jsonnet b/src/dashboards/httproutes.jsonnet new file mode 100644 index 0000000..93186d2 --- /dev/null +++ b/src/dashboards/httproutes.jsonnet @@ -0,0 +1,16 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('HTTPRoutes', 'gatewayapihttproutes', [ + var.routes('httproute', 'HTTPRoute') +]) ++ g.dashboard.withPanels([ + gwapi.row('HTTPRoutes', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of HTTPRoutes across all namespaces', 'count(gatewayapi_httproute_created{name=~"${httproute}"})'), + gwapi.stat('Tar. Parents', 3, 2, 2, 1, 'Total number of parents (e.g. Gateways) targeted by HTTPRoutes', 'count(gatewayapi_httproute_parent_info{name=~"${httproute}"})'), + gwapi.routePanel('HTTPRoutes',6,10,4,1,'gatewayapi_httproute_created{name=~"${httproute}"}'), + gwapi.routePanelReferences('HTTPRoute *targeted* Parent References', 6, 10, 14, 1, 'gatewayapi_httproute_parent_info{name=~"${httproute}"}'), + gwapi.stat('Att. Parents', 3, 2, 0, 4, 'Total number of parents (e.g. Gateways) attached to HTTPRoutes', 'count(gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"})'), + gwapi.routePanelReferences('HTTPRoute *attached* Parent References', 6, 10, 4, 7, 'gatewayapi_httproute_status_parent_info{name=~\"${httproute}\"}') +]) diff --git a/src/dashboards/lib/g.libsonnet b/src/dashboards/lib/g.libsonnet new file mode 100644 index 0000000..5695fb7 --- /dev/null +++ b/src/dashboards/lib/g.libsonnet @@ -0,0 +1 @@ +import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet' \ No newline at end of file diff --git a/src/dashboards/lib/gwapi/gwapi.libsonnet b/src/dashboards/lib/gwapi/gwapi.libsonnet new file mode 100644 index 0000000..07c696c --- /dev/null +++ b/src/dashboards/lib/gwapi/gwapi.libsonnet @@ -0,0 +1,280 @@ +local g = import '../g.libsonnet'; +local var = import './variables.libsonnet'; + +{ + dashboard(title, uid, variables): + g.dashboard.new('Gateway API State / ' + title) + + g.dashboard.withUid(uid) + + g.dashboard.time.withFrom('now-1h') + + g.dashboard.withStyle('dark') + + g.dashboard.withTags(['gateway-api', 'gateway-api-state'],) + + g.dashboard.withEditable(false) + + g.dashboard.withLinks([ + g.dashboard.link.dashboards.new('Gateway Dashboards', ['gateway-api-state'],) + + g.dashboard.link.dashboards.options.withTargetBlank(false) + + g.dashboard.link.dashboards.options.withKeepTime(true) + + g.dashboard.link.dashboards.options.withIncludeVars(true) + + g.dashboard.link.dashboards.options.withAsDropdown(false), + ]) + + g.dashboard.withVariables([ + var.datasource, + ] + variables,), + + row(title, h, w, x, y): + g.panel.row.new(title) + + g.panel.row.withGridPos({ h: h, w: w, x: x, y: y },), + + stat(title, h, w, x, y, desc, expr): + g.panel.stat.new(title) + + g.panel.stat.panelOptions.withGridPos(h, w, x, y) + + g.panel.stat.panelOptions.withDescription(desc) + + g.panel.stat.queryOptions.withDatasource('prometheus', '$datasource') + + g.panel.stat.queryOptions.withTargets([ + g.query.prometheus.new( + '$datasource', + expr, + ) + + g.query.prometheus.withInstant(true), + ]), + + table(title, h, w, x, y, expr): + g.panel.table.new(title) + + g.panel.table.panelOptions.withGridPos(h, w, x, y) + + g.panel.table.queryOptions.withDatasource('prometheus', '$datasource') + + g.panel.table.queryOptions.withTargets([ + g.query.prometheus.new( + '$datasource', + expr, + ) + + g.query.prometheus.withInstant(true) + + g.query.prometheus.withRange(false) + + g.query.prometheus.withFormat('table'), + ]), + + tableRouteByGateway(title, h, w, x, y, expr, linkTitle, linkUrl): + self.table(title, h, w, x, y, expr) + + g.panel.table.standardOptions.withOverrides([ + g.panel.table.fieldOverride.byName.new('Name') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.displayMode', + 'color-text' + ) + + g.panel.table.fieldOverride.byName.withProperty( + 'links', + [ + { + title: linkTitle, + url: linkUrl, + }, + ] + ), + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'name', + 'namespace', + 'parent_name', + ], + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: false, + }, + indexByName: { + Value: 9, + customresource_kind: 0, + customresource_version: 1, + hostname: 5, + listener_name: 4, + name: 2, + namespace: 3, + port: 6, + protocol: 7, + tls_mode: 8, + }, + renameByName: { + Value: '# Attached Routes', + customresource_kind: 'Kind', + customresource_version: 'Version', + hostname: 'Hostname', + listener_name: 'Listener Name', + name: 'Name', + namespace: 'Namespace', + parent_kind: '', + parent_name: 'Gateway', + port: 'Port', + prometheus: '', + protocol: 'Protocol', + tls_mode: 'TLS Mode', + }, + }), + ]), + + routePanel(title, h, w, x, y, expr): + self.table(title, h, w, x, y, expr) + + g.panel.table.standardOptions.withOverrides([ + g.panel.table.fieldOverride.byName.new('Created At') + + g.panel.table.fieldOverride.byName.withProperty( + 'unit', + 'dateTimeAsIso' + ), + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'name', + 'namespace', + 'Value', + ], + }, + }), + g.panel.table.transformation.withId('calculateField') + + g.panel.table.transformation.withOptions({ + alias: 'Created At', + binary: { + left: 'Value', + operator: '*', + reducer: 'sum', + right: '1000', + }, + mode: 'binary', + reduce: { + reducer: 'sum', + }, + replaceFields: false, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: true, + }, + indexByName: {}, + renameByName: { + Value: 'Created', + customresource_kind: 'Kind', + customresource_version: 'Version', + name: 'Name', + namespace: 'Namespace', + }, + }), + ]), + + routePanelReferences(title, h, w, x, y, expr): + self.table(title, h, w, x, y, expr) + + g.panel.table.standardOptions.withOverrides([ + g.panel.table.fieldOverride.byName.new('Created At') + + g.panel.table.fieldOverride.byName.withProperty( + 'unit', + 'dateTimeAsIso' + ), + g.panel.table.fieldOverride.byName.new('Kind') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '108' + ), + g.panel.table.fieldOverride.byName.new('Version') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '85' + ), + g.panel.table.fieldOverride.byName.new('Listener Name') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '119' + ), + g.panel.table.fieldOverride.byName.new('Hostname') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '163' + ), + g.panel.table.fieldOverride.byName.new('Port') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '59' + ), + g.panel.table.fieldOverride.byName.new('Protocol') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '104' + ), + g.panel.table.fieldOverride.byName.new('Name') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '98' + ), + g.panel.table.fieldOverride.byName.new('Parent Kind') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '103' + ), + g.panel.table.fieldOverride.byName.new('Parent Name') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '118' + ), + g.panel.table.fieldOverride.byName.new('Namespace') + + g.panel.table.fieldOverride.byName.withProperty( + 'custom.width', + '124' + ), + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('filterFieldsByName') + + g.panel.table.transformation.withOptions({ + include: { + names: [ + 'customresource_version', + 'name', + 'namespace', + 'parent_kind', + 'parent_name', + 'parent_namespace', + ], + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Value: true, + }, + indexByName: { + Value: 9, + customresource_kind: 0, + customresource_version: 1, + hostname: 5, + listener_name: 4, + name: 2, + namespace: 3, + port: 6, + protocol: 7, + tls_mode: 8, + }, + renameByName: { + Value: '', + customresource_kind: 'Kind', + customresource_version: 'Version', + hostname: 'Hostname', + listener_name: 'Listener Name', + name: 'Name', + namespace: 'Namespace', + parent_kind: 'Parent Kind', + parent_name: 'Parent Name', + parent_namespace: 'Parent Namespace', + port: 'Port', + prometheus: '', + protocol: 'Protocol', + tls_mode: 'TLS Mode', + type: 'Address Type', + value: 'Address Value', + }, + }), + ]), +} \ No newline at end of file diff --git a/src/dashboards/lib/gwapi/variables.libsonnet b/src/dashboards/lib/gwapi/variables.libsonnet new file mode 100644 index 0000000..deb5477 --- /dev/null +++ b/src/dashboards/lib/gwapi/variables.libsonnet @@ -0,0 +1,49 @@ +local g = import '../g.libsonnet'; +local var = g.dashboard.variable; +local table = g.panel.table; + +{ + datasource: + var.datasource.new( + 'datasource', + 'prometheus', + ) + + var.datasource.generalOptions.withLabel('Data Source'), + + gateways(name, regex, label): + var.query.new(name, { + query: 'label_values(gatewayapi_'+name+'_info, name)', + refId: 'StandardVariableQuery', + }) + + var.query.withRegex(regex) + + var.query.withDatasource('prometheus', '${datasource}') + + var.query.selectionOptions.withIncludeAll(true) + + var.query.selectionOptions.withMulti(true) + + var.query.generalOptions.withLabel(label), + + routes(name, label): + var.query.new(name, { + query: 'label_values(gatewayapi_'+name+'_created, name)', + refId: 'StandardVariableQuery', + }) + + var.query.withRegex('/(.*)/') + + var.query.withDatasource('prometheus', '${datasource}') + + var.query.selectionOptions.withIncludeAll(true) + + var.query.selectionOptions.withMulti(true) + + var.query.generalOptions.withLabel(label), + + withOverrides(fieldOverride): + table.standardOptions.withOverrides( + fieldOverride + ), + + overrideNameWithProp(name, id, value): + table.fieldOverride.byName.new(name) + + table.fieldOverride.byName.withProperty(id, value), + + overrideName(name): + table.fieldOverride.byName.new(name), + + overrideProp(id, value): + table.fieldOverride.byName.withProperty(id, value), +} \ No newline at end of file diff --git a/src/dashboards/tcproutes.jsonnet b/src/dashboards/tcproutes.jsonnet new file mode 100644 index 0000000..28a9023 --- /dev/null +++ b/src/dashboards/tcproutes.jsonnet @@ -0,0 +1,16 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('TCPRoutes', 'gatewayapitcproutes', [ + var.routes('tcproute', 'TCPRoute') +]) ++ g.dashboard.withPanels([ + gwapi.row('TCPRoutes', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of TCPRoutes across all namespaces', 'count(gatewayapi_tcproute_created{name=~"${tcproute}"})'), + gwapi.stat('Tar. Parents', 3, 2, 2, 1, 'Total number of parents (e.g. Gateways) targeted by TCPRoutes', 'count(gatewayapi_tcproute_parent_info{name=~"${tcproute}"})'), + gwapi.routePanel('TCPRoutes',6,10,4,1,'gatewayapi_tcproute_created{name=~"${tcproute}"}'), + gwapi.routePanelReferences('TCPRoute *targeted* Parent References', 6, 10, 14, 1, 'gatewayapi_tcproute_parent_info{name=~"${tcproute}"}'), + gwapi.stat('Att. Parents', 3, 2, 0, 4, 'Total number of parents (e.g. Gateways) attached to TCPRoutes', 'count(gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"})'), + gwapi.routePanelReferences('TCPRoute *attached* Parent References', 6, 10, 4, 7, 'gatewayapi_tcproute_status_parent_info{name=~\"${tcproute}\"}') +]) diff --git a/src/dashboards/tlsroutes.jsonnet b/src/dashboards/tlsroutes.jsonnet new file mode 100644 index 0000000..fa34f3b --- /dev/null +++ b/src/dashboards/tlsroutes.jsonnet @@ -0,0 +1,16 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('TLSRoutes', 'gatewayapitlsroutes', [ + var.routes('tlsroute', 'TLSRoute') +]) ++ g.dashboard.withPanels([ + gwapi.row('TLSRoutes', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of TLSRoutes across all namespaces', 'count(gatewayapi_tlsroute_created{name=~"${tlsroute}"})'), + gwapi.stat('Tar. Parents', 3, 2, 2, 1, 'Total number of parents (e.g. Gateways) targeted by TLSRoutes', 'count(gatewayapi_tlsroute_parent_info{name=~"${tlsroute}"})'), + gwapi.routePanel('TLSRoutes',6,10,4,1,'gatewayapi_tlsroute_created{name=~"${tlsroute}"}'), + gwapi.routePanelReferences('TLSRoute *targeted* Parent References', 6, 10, 14, 1, 'gatewayapi_tlsroute_parent_info{name=~"${tlsroute}"}'), + gwapi.stat('Att. Parents', 3, 2, 0, 4, 'Total number of parents (e.g. Gateways) attached to TLSRoutes', 'count(gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"})'), + gwapi.routePanelReferences('TLSRoute *attached* Parent References', 6, 10, 4, 7, 'gatewayapi_tlsroute_status_parent_info{name=~\"${tlsroute}\"}') +]) diff --git a/src/dashboards/udproutes.jsonnet b/src/dashboards/udproutes.jsonnet new file mode 100644 index 0000000..0b6387c --- /dev/null +++ b/src/dashboards/udproutes.jsonnet @@ -0,0 +1,16 @@ +local g = import 'lib/g.libsonnet'; +local gwapi = import 'lib/gwapi/gwapi.libsonnet'; +local var = import 'lib/gwapi/variables.libsonnet'; + +gwapi.dashboard('UDPRoutes', 'gatewayapiudproutes', [ + var.routes('udproute', 'UDPRoute') +]) ++ g.dashboard.withPanels([ + gwapi.row('UDPRoutes', 1, 24, 0, 0), + gwapi.stat('Total', 3, 2, 0, 1, 'Total number of UDPRoutes across all namespaces', 'count(gatewayapi_udproute_created{name=~"${udproute}"})'), + gwapi.stat('Tar. Parents', 3, 2, 2, 1, 'Total number of parents (e.g. Gateways) targeted by UDPRoutes', 'count(gatewayapi_udproute_parent_info{name=~"${udproute}"})'), + gwapi.routePanel('UDPRoutes',6,10,4,1,'gatewayapi_udproute_created{name=~"${udproute}"}'), + gwapi.routePanelReferences('UDPRoute *targeted* Parent References', 6, 10, 14, 1, 'gatewayapi_udproute_parent_info{name=~"${udproute}"}'), + gwapi.stat('Att. Parents', 3, 2, 0, 4, 'Total number of parents (e.g. Gateways) attached to UDPRoutes', 'count(gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"})'), + gwapi.routePanelReferences('UDPRoute *attached* Parent References', 6, 10, 4, 7, 'gatewayapi_udproute_status_parent_info{name=~\"${udproute}\"}') +])