From b42adda75e2a9ef603ac2271de849161d27b1478 Mon Sep 17 00:00:00 2001 From: David Martin Date: Thu, 21 Mar 2024 11:39:24 +0000 Subject: [PATCH] Add examples folder for alerts & dashboards, and observability stack (#461) * Add examples folder for alerts & dashboards, with initial 2 dashboards * Add example observability stack & docs for using --- config/observability/README.md | 48 + .../additional-scrape-configs.yaml | 81 + config/observability/cluster_role.yaml | 23 + config/observability/grafana_datasources.yaml | 14 + .../grafana_deployment_patch.yaml | 84 + .../observability/ksm_clusterrole_patch.yaml | 39 + .../observability/ksm_deployment_patch.yaml | 21 + config/observability/kustomization.yaml | 95 + config/observability/podmonitor-envoy.yaml | 14 + .../observability/servicemonitor-istiod.yaml | 13 + examples/alerts/.gitignore | 0 examples/dashboards/app_developer.json | 1692 +++++++++++++++++ examples/dashboards/platform_engineer.json | 1544 +++++++++++++++ 13 files changed, 3668 insertions(+) create mode 100644 config/observability/README.md create mode 100644 config/observability/additional-scrape-configs.yaml create mode 100644 config/observability/cluster_role.yaml create mode 100644 config/observability/grafana_datasources.yaml create mode 100644 config/observability/grafana_deployment_patch.yaml create mode 100644 config/observability/ksm_clusterrole_patch.yaml create mode 100644 config/observability/ksm_deployment_patch.yaml create mode 100644 config/observability/kustomization.yaml create mode 100644 config/observability/podmonitor-envoy.yaml create mode 100644 config/observability/servicemonitor-istiod.yaml create mode 100644 examples/alerts/.gitignore create mode 100644 examples/dashboards/app_developer.json create mode 100644 examples/dashboards/platform_engineer.json diff --git a/config/observability/README.md b/config/observability/README.md new file mode 100644 index 000000000..bcb038f3b --- /dev/null +++ b/config/observability/README.md @@ -0,0 +1,48 @@ +# Observability stack guide + +## Deploying the observabilty stack + +```bash +./bin/kustomize build ./config/observability/| docker run --rm -i ryane/kfilt -i kind=CustomResourceDefinition | kubectl apply --server-side -f - +./bin/kustomize build ./config/observability/| docker run --rm -i ryane/kfilt -x kind=CustomResourceDefinition | kubectl apply -f - +``` + +This will deploy prometheus, alertmanager and grafana into the `monitoring` namespace, +along with metrics scrape configuration for Istio and Envoy. + +## Accessing Grafana & Prometheus + +Use port forwarding to access Grafana & Prometheus: + +```bash +kubectl -n monitoring port-forward service/grafana 3000:3000 +``` + +The Grafana UI can be found at [http://127.0.0.1:3000/](http://127.0.0.1:3000/) (default user/pass of `admin` & `admin`). +It is pre-loaded with some kubernetes and [gateway-api-state](https://github.com/Kuadrant/gateway-api-state-metrics) dashboards. + +```bash +kubectl -n monitoring port-forward service/prometheus-k8s 9090:9090 +``` + +The Prometheus UI can be found at [http://127.0.0.1:9090](http://127.0.0.1:9090). + +## Editing dashboards + +Dashboards can be imported in the Grafana UI using either raw JSON, a JSON file, or the URL/ID of one of the [dashboards on grafana.com](https://grafana.com/grafana/dashboards/). +Some example dashboards are available in the [/examples](/examples) folder. + +To import a dashboard, click on the plus icon on the left sidebar and navigate to **Import**. After entering a dashboard URL/ID or JSON, click **Load**. + +After loading the dashboard, the next screen allows you to select a name and folder for the dashboard and specify the data source before finally importing the dashboard. + +Grafana dashboards can be exported as JSON in order to add them to the project's git repo. +When viewing the dashboard you wish to export, click on the **share** button at the top of the screen. + +In the modal popup click **Export** and then **Save to file**. + +## Editing alerting rules + +Alerting rules can be defined in [PrometheusRules](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/alerting.md#configuring-alertmanager-in-prometheus) resources. +The can be viewed in the Prometheus UI Alerts tab. +Some example alerting rules are available in the [/examples](/examples) folder. diff --git a/config/observability/additional-scrape-configs.yaml b/config/observability/additional-scrape-configs.yaml new file mode 100644 index 000000000..eea5c5d75 --- /dev/null +++ b/config/observability/additional-scrape-configs.yaml @@ -0,0 +1,81 @@ +apiVersion: v1 +kind: Secret +metadata: + name: additional-scrape-configs + namespace: monitoring +stringData: + prometheus-additional.yaml: | + - job_name: kubernetes-pods + honor_labels: true + honor_timestamps: true + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] + separator: ; + regex: "true" + replacement: $1 + action: keep + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow] + separator: ; + regex: "true" + replacement: $1 + action: drop + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme] + separator: ; + regex: (https?) + target_label: __scheme__ + replacement: $1 + action: replace + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] + separator: ; + regex: (.+) + target_label: __metrics_path__ + replacement: $1 + action: replace + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip] + separator: ; + regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}) + target_label: __address__ + replacement: '[$2]:$1' + action: replace + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip] + separator: ; + regex: (\d+);((([0-9]+?)(\.|$)){4}) + target_label: __address__ + replacement: $2:$1 + action: replace + - separator: ; + regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+) + replacement: __param_$1 + action: labelmap + - separator: ; + regex: __meta_kubernetes_pod_label_(.+) + replacement: $1 + action: labelmap + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $1 + action: replace + - source_labels: [__meta_kubernetes_pod_phase] + separator: ; + regex: Pending|Succeeded|Failed|Completed + replacement: $1 + action: drop + kubernetes_sd_configs: + - role: pod + kubeconfig_file: "" + follow_redirects: true + enable_http2: true diff --git a/config/observability/cluster_role.yaml b/config/observability/cluster_role.yaml new file mode 100644 index 000000000..69079131f --- /dev/null +++ b/config/observability/cluster_role.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus-k8s +rules: + - apiGroups: + - "" + resources: + - nodes/metrics + verbs: + - get + - nonResourceURLs: + - /metrics + verbs: + - get + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - list + - watch diff --git a/config/observability/grafana_datasources.yaml b/config/observability/grafana_datasources.yaml new file mode 100644 index 000000000..06d2cdf59 --- /dev/null +++ b/config/observability/grafana_datasources.yaml @@ -0,0 +1,14 @@ +{ + "apiVersion": 1, + "datasources": [ + { + "access": "proxy", + "editable": false, + "name": "prometheus", + "orgId": 1, + "type": "prometheus", + "url": "http://prometheus-k8s.monitoring.svc:9090", + "version": 1 + } + ] +} diff --git a/config/observability/grafana_deployment_patch.yaml b/config/observability/grafana_deployment_patch.yaml new file mode 100644 index 000000000..5d3a5ea82 --- /dev/null +++ b/config/observability/grafana_deployment_patch.yaml @@ -0,0 +1,84 @@ +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-gatewayclasses + configMap: + defaultMode: 420 + name: grafana-gatewayclasses +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-gateways + configMap: + defaultMode: 420 + name: grafana-gateways +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-httproutes + configMap: + defaultMode: 420 + name: grafana-httproutes +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-grpcroutes + configMap: + defaultMode: 420 + name: grafana-grpcroutes +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-tlsroutes + configMap: + defaultMode: 420 + name: grafana-tlsroutes +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-tcproutes + configMap: + defaultMode: 420 + name: grafana-tcproutes +- op: add + path: /spec/template/spec/volumes/- + value: + name: grafana-udproutes + configMap: + defaultMode: 420 + name: grafana-udproutes +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-gatewayclasses + mountPath: /grafana-dashboard-definitions/0/grafana-gatewayclasses +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-gateways + mountPath: /grafana-dashboard-definitions/0/grafana-gateways +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-httproutes + mountPath: /grafana-dashboard-definitions/0/grafana-httproutes +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-grpcroutes + mountPath: /grafana-dashboard-definitions/0/grafana-grpcroutes +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-tlsroutes + mountPath: /grafana-dashboard-definitions/0/grafana-tlsroutes +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-tcproutes + mountPath: /grafana-dashboard-definitions/0/grafana-tcpcroutes +- op: add + path: /spec/template/spec/containers/0/volumeMounts/- + value: + name: grafana-udproutes + mountPath: /grafana-dashboard-definitions/0/grafana-udproutes diff --git a/config/observability/ksm_clusterrole_patch.yaml b/config/observability/ksm_clusterrole_patch.yaml new file mode 100644 index 000000000..8766bb16e --- /dev/null +++ b/config/observability/ksm_clusterrole_patch.yaml @@ -0,0 +1,39 @@ +- op: add + path: /rules/- + value: + apiGroups: + - "apiextensions.k8s.io" + resources: + - customresourcedefinitions + verbs: + - list + - watch +- op: add + path: /rules/- + value: + apiGroups: + - "gateway.networking.k8s.io" + resources: + - gateways + - gatewayclasses + - httproutes + - grpcroutes + - tcproutes + - tlsroutes + - udproutes + verbs: + - list + - watch +- op: add + path: /rules/- + value: + apiGroups: + - "kuadrant.io" + resources: + - tlspolicies + - dnspolicies + - ratelimitpolicies + - authpolicies + verbs: + - list + - watch diff --git a/config/observability/ksm_deployment_patch.yaml b/config/observability/ksm_deployment_patch.yaml new file mode 100644 index 000000000..160b2eaf1 --- /dev/null +++ b/config/observability/ksm_deployment_patch.yaml @@ -0,0 +1,21 @@ +- op: replace + path: /spec/template/spec/containers/0/image + value: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.10.1 +- op: add + path: /spec/template/spec/volumes + value: + - name: custom-resource-state + configMap: + defaultMode: 420 + name: custom-resource-state +- op: add + path: /spec/template/spec/containers/0/volumeMounts + value: + - name: custom-resource-state + mountPath: /custom-resource-state +- op: add + path: /spec/template/spec/containers/0/args/- + value: --custom-resource-state-config-file +- op: add + path: /spec/template/spec/containers/0/args/- + value: /custom-resource-state/custom-resource-state.yaml diff --git a/config/observability/kustomization.yaml b/config/observability/kustomization.yaml new file mode 100644 index 000000000..e119ddcd8 --- /dev/null +++ b/config/observability/kustomization.yaml @@ -0,0 +1,95 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - github.com/prometheus-operator/kube-prometheus?ref=release-0.11 + - github.com/Kuadrant/gateway-api-state-metrics?ref=main + - github.com/Kuadrant/gateway-api-state-metrics/config/examples/dashboards?ref=main +# To scrape istio metrics, 3 configurations are required: +# 1. Envoy metrics directly from the istio ingress gateway pod + - podmonitor-envoy.yaml +# 2. Istiod metrics via the istiod service + - servicemonitor-istiod.yaml +# 3. Istio metrics exposed via envoy on 15020 in each application. +# We're using the additionalScrapeConfigs field of the Prometheus CR +# here to read existing prometheus scrape annotations on pods. +# Ideally this would be done via another PodMonitor or ServicMonitor, +# however that isn't possible as the container port 15020 is not +# exposed or named, so we need to drop to raw custom prometheus +# scrape config. +# See https://github.com/prometheus-operator/prometheus-operator/issues/3071#issuecomment-763746836 + - additional-scrape-configs.yaml + +patchesStrategicMerge: + - cluster_role.yaml + +patches: + - target: + kind: Prometheus + name: k8s + patch: |- + kind: Prometheus + metadata: + name: k8s + spec: + replicas: 1 + additionalScrapeConfigs: + name: additional-scrape-configs + key: prometheus-additional.yaml + - target: + kind: Alertmanager + name: main + patch: |- + kind: Alertmanager + metadata: + name: main + spec: + replicas: 1 + - target: + kind: ClusterRole + name: prometheus-k8s + patch: |- + - op: add + path: /rules/- + value: + apiGroups: + - "" + resources: + - services + - endpoints + verbs: + - get + - list + - watch + +# Patch grafana deployment to include dashboard configmaps +patchesJson6902: + - target: + group: apps + version: v1 + kind: Deployment + name: kube-state-metrics + path: ksm_deployment_patch.yaml + - target: + group: rbac.authorization.k8s.io + version: v1 + kind: ClusterRole + name: kube-state-metrics + path: ksm_clusterrole_patch.yaml + - target: + group: apps + version: v1 + kind: Deployment + name: grafana + path: grafana_deployment_patch.yaml + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: grafana-datasources + namespace: monitoring + behavior: replace + files: + - grafana_datasources.yaml + diff --git a/config/observability/podmonitor-envoy.yaml b/config/observability/podmonitor-envoy.yaml new file mode 100644 index 000000000..1d98a8f8a --- /dev/null +++ b/config/observability/podmonitor-envoy.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: envoy-stats +spec: + namespaceSelector: + matchNames: + - istio-system + selector: + matchLabels: + app: istio-ingressgateway + podMetricsEndpoints: + - port: http-envoy-prom + path: /stats/prometheus diff --git a/config/observability/servicemonitor-istiod.yaml b/config/observability/servicemonitor-istiod.yaml new file mode 100644 index 000000000..656cd440b --- /dev/null +++ b/config/observability/servicemonitor-istiod.yaml @@ -0,0 +1,13 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: istiod +spec: + namespaceSelector: + matchNames: + - istio-system + selector: + matchLabels: + app: istiod + endpoints: + - port: http-monitoring diff --git a/examples/alerts/.gitignore b/examples/alerts/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/examples/dashboards/app_developer.json b/examples/dashboards/app_developer.json new file mode 100644 index 000000000..aefedae9f --- /dev/null +++ b/examples/dashboards/app_developer.json @@ -0,0 +1,1692 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "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" + } + ] + }, + "description": "App Developer Dashboard", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 7630, + "graphTooltip": 0, + "id": 16, + "iteration": 1698141257778, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 109, + "panels": [], + "title": "Core API Panels", + "type": "row" + }, + { + "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": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 97, + "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_httproute_hostname_info{}", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_httproute_labels{}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + } + ], + "title": "APIs", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "name" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time 1": true, + "Time 2": true, + "Value #A": true, + "Value #B": true, + "__name__ 1": true, + "__name__ 2": true, + "container 1": true, + "container 2": true, + "customresource_group 1": true, + "customresource_group 2": true, + "customresource_kind 1": true, + "customresource_kind 2": true, + "customresource_version 1": true, + "customresource_version 2": true, + "exported_namespace 2": true, + "instance 1": true, + "instance 2": true, + "job 1": true, + "job 2": true, + "namespace 1": true, + "namespace 2": true, + "prometheus 1": true, + "prometheus 2": true + }, + "indexByName": { + "Time 1": 1, + "Time 2": 14, + "Value #A": 13, + "Value #B": 26, + "__name__ 1": 2, + "__name__ 2": 15, + "container 1": 3, + "container 2": 16, + "customresource_group 1": 4, + "customresource_group 2": 17, + "customresource_kind 1": 5, + "customresource_kind 2": 18, + "customresource_version 1": 6, + "customresource_version 2": 19, + "deployment": 20, + "exported_namespace 1": 8, + "exported_namespace 2": 21, + "hostname": 7, + "instance 1": 9, + "instance 2": 22, + "job 1": 10, + "job 2": 23, + "name": 0, + "namespace 1": 11, + "namespace 2": 24, + "prometheus 1": 12, + "prometheus 2": 25 + }, + "renameByName": { + "deployment": "API Workload (Deployment)", + "exported_namespace 1": "Namespace", + "exported_namespace 2": "", + "hostname": "Hostname", + "name": "API Name (HTTPRoute)", + "owner": "Owner" + } + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "API Name (HTTPRoute)", + "Hostname", + "Namespace", + "API Workload (Deployment)", + "owner" + ] + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 5 + }, + "id": 99, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "legendFormat": "API: {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "API Request Rate (/sec)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 5 + }, + "id": 101, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"4.*|5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "legendFormat": "Total Errors: {{name}} ", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"4.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "4xx: {{name}} ", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "5xx: {{name}} ", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"404\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "404: {{name}}", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"401\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "401: {{name}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"429\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "429: {{name}}", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"500\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "500: {{name}}", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"501\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "501: {{name}}", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total{response_code=~\"503\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "503: {{name}}", + "range": true, + "refId": "I" + } + ], + "title": "API Error Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 5 + }, + "id": 124, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*|5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "legendFormat": "Total Errors: {{name}} ", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "4xx: {{name}} ", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "5xx: {{name}} ", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"401\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "401: {{name}}", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"429\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "429: {{name}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"404\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "404: {{name}}", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"500\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "500: {{name}}", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"501\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "501: {{name}}", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(rate(istio_requests_total{response_code=~\"503\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "hide": false, + "legendFormat": "503: {{name}}", + "range": true, + "refId": "I" + } + ], + "title": "API Error Rate %", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 129, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "P50 {{destination_service_name}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "legendFormat": "P90 {{destination_service_name}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "legendFormat": "P99 {{destination_service_name}}", + "range": true, + "refId": "B" + } + ], + "title": "API Request Duration", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "color-text", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. Request Rate" + }, + { + "id": "unit", + "value": "reqps" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "Increase/Decrease" + }, + { + "id": "unit", + "value": "reqps" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Requests" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. Error Rate" + }, + { + "id": "unit", + "value": "reqps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. 4xx Rate" + }, + { + "id": "unit", + "value": "reqps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. 5xx Rate" + }, + { + "id": "unit", + "value": "reqps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #G" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Errors" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #H" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. Error Rate %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #I" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. 4xx Rate %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #J" + }, + "properties": [ + { + "id": "displayName", + "value": "Cur. 5xx Rate %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #K" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Errors %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0.01 + } + ] + } + }, + { + "id": "noValue", + "value": "0" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 122 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Increase/Decrease" + }, + "properties": [ + { + "id": "custom.width", + "value": 138 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total Requests" + }, + "properties": [ + { + "id": "custom.width", + "value": 114 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total Errors" + }, + "properties": [ + { + "id": "custom.width", + "value": 105 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Error Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 119 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "4xx Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 104 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "5xx Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "5xx Rate %" + }, + "properties": [ + { + "id": "custom.width", + "value": 116 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Error Rate %" + }, + "properties": [ + { + "id": "custom.width", + "value": 110 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Errors %" + }, + "properties": [ + { + "id": "custom.width", + "value": 91 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "4xx Rate %" + }, + "properties": [ + { + "id": "custom.width", + "value": 103 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "API" + }, + "properties": [ + { + "id": "custom.width", + "value": 128 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total Errors %" + }, + "properties": [ + { + "id": "custom.width", + "value": 112 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Cur. Error Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 125 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 127, + "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": "sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum(rate(istio_requests_total[5m])) by (destination_service_name) - sum(rate(istio_requests_total[5m] offset $__range)) by (destination_service_name))\n* on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(increase(istio_requests_total[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(istio_requests_total{response_code=~\"4.*|5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(istio_requests_total{response_code=~\"4.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(istio_requests_total{response_code=~\"5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(increase(istio_requests_total{response_code=~\"4.*|5.*\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*|5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum(rate(istio_requests_total{response_code=~\"5.*\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "(sum(increase(istio_requests_total{response_code=~\"4.*|5.*\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(increase(istio_requests_total[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "K" + } + ], + "title": "API Requests", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "container": true, + "customresource_group": true, + "customresource_kind": true, + "customresource_version": true, + "deployment": true, + "destination_service_name": true, + "destination_workload": true, + "exported_namespace": true, + "instance": true, + "job": true, + "namespace": true, + "prometheus": true + }, + "indexByName": { + "Time": 1, + "Value #A": 14, + "Value #B": 15, + "Value #C": 13, + "Value #D": 18, + "Value #E": 20, + "Value #F": 22, + "Value #G": 16, + "Value #H": 19, + "Value #I": 21, + "Value #J": 23, + "Value #K": 17, + "container": 2, + "customresource_group": 3, + "customresource_kind": 4, + "customresource_version": 5, + "deployment": 6, + "destination_workload": 7, + "exported_namespace": 8, + "instance": 9, + "job": 10, + "name": 0, + "namespace": 11, + "prometheus": 12 + }, + "renameByName": { + "Time": "", + "deployment": "", + "exported_namespace": "", + "name": "API" + } + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "API", + "Value #C", + "Value #B", + "Value #G", + "Value #K", + "Value #D", + "Value #H", + "Value #E", + "Value #I", + "Value #A" + ] + } + } + } + ], + "type": "table" + } + ], + "refresh": "5m", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "thanos-query", + "value": "thanos-query" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "App Developer Dashboard", + "uid": "6bHBHa7Izx", + "version": 1, + "weekStart": "" +} diff --git a/examples/dashboards/platform_engineer.json b/examples/dashboards/platform_engineer.json new file mode 100644 index 000000000..768e39e51 --- /dev/null +++ b/examples/dashboards/platform_engineer.json @@ -0,0 +1,1544 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "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" + } + ] + }, + "description": "APIs", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 7630, + "graphTooltip": 0, + "id": 15, + "iteration": 1700061613956, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 128, + "panels": [], + "title": "Gateways and Policies", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Total Gateways with an Accepted state of True", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 134, + "options": { + "colorMode": "value", + "graphMode": "none", + "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_gateway_status{type=\"Accepted\"} > 0)", + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "Accepted", + "type": "stat" + }, + { + "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": "Programmed" + }, + "properties": [ + { + "id": "unit", + "value": "bool" + }, + { + "id": "custom.width", + "value": 100 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Accepted" + }, + "properties": [ + { + "id": "unit", + "value": "bool" + }, + { + "id": "custom.width", + "value": 92 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Gateway Class" + }, + "properties": [ + { + "id": "custom.width", + "value": 395 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 136 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 22, + "x": 2, + "y": 1 + }, + "id": 115, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_gateway_info", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_gateway_status{type=\"Programmed\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_gateway_status{type=\"Accepted\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + } + ], + "title": "Gateways", + "transformations": [ + { + "id": "concatenate", + "options": { + "frameNameLabel": "frame", + "frameNameMode": "drop" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value #A": true, + "__name__ 1": true, + "__name__ 2": true, + "__name__ 3": true, + "container 1": true, + "container 2": true, + "container 3": true, + "customresource_group 1": true, + "customresource_group 2": true, + "customresource_group 3": true, + "customresource_kind 1": true, + "customresource_kind 2": true, + "customresource_kind 3": true, + "customresource_version 1": true, + "customresource_version 2": true, + "customresource_version 3": true, + "exported_namespace 1": false, + "exported_namespace 2": true, + "exported_namespace 3": true, + "instance 1": true, + "instance 2": true, + "instance 3": true, + "job 1": true, + "job 2": true, + "job 3": true, + "name 1": false, + "name 2": true, + "name 3": true, + "namespace 1": true, + "namespace 2": true, + "namespace 3": true, + "prometheus 1": true, + "prometheus 2": true, + "prometheus 3": true, + "type 1": true, + "type 2": true + }, + "indexByName": { + "Time": 1, + "Value #A": 13, + "Value #B": 26, + "Value #C": 39, + "__name__ 1": 2, + "__name__ 2": 14, + "__name__ 3": 27, + "container 1": 3, + "container 2": 15, + "container 3": 28, + "customresource_group 1": 4, + "customresource_group 2": 16, + "customresource_group 3": 29, + "customresource_kind 1": 5, + "customresource_kind 2": 17, + "customresource_kind 3": 30, + "customresource_version 1": 6, + "customresource_version 2": 18, + "customresource_version 3": 31, + "exported_namespace 1": 8, + "exported_namespace 2": 19, + "exported_namespace 3": 32, + "gatewayclass_name": 0, + "instance 1": 9, + "instance 2": 20, + "instance 3": 33, + "job 1": 10, + "job 2": 21, + "job 3": 34, + "name 1": 7, + "name 2": 22, + "name 3": 35, + "namespace 1": 11, + "namespace 2": 23, + "namespace 3": 36, + "prometheus 1": 12, + "prometheus 2": 24, + "prometheus 3": 37, + "type 1": 25, + "type 2": 38 + }, + "renameByName": { + "Time": "", + "Value #B": "Programmed", + "Value #C": "Accepted", + "__name__ 3": "", + "exported_namespace 1": "Namespace", + "gatewayclass_name": "Gateway Class", + "job 1": "", + "name 1": "Name" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Total Gateways with a Programmed state of True", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 4 + }, + "id": 135, + "options": { + "colorMode": "value", + "graphMode": "none", + "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_gateway_status{type=\"Programmed\"} > 0)", + "instant": true, + "range": false, + "refId": "A" + } + ], + "title": "Programmed", + "type": "stat" + }, + { + "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": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": 142 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 89 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Target Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": 121 + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 117, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_tlspolicy_target_info{target_kind=\"Gateway\"}", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_ratelimitpolicy_target_info{target_kind=\"Gateway\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_authpolicy_target_info{target_kind=\"Gateway\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_dnspolicy_target_info{target_kind=\"Gateway\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "D" + } + ], + "title": "Gateway Policies", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "Value #A": true, + "Value #B": true, + "Value #D": true, + "__name__": true, + "container": true, + "customresource_group": true, + "customresource_version": true, + "instance": true, + "job": true, + "namespace": true, + "prometheus": true, + "target_group": true + }, + "indexByName": { + "Time": 0, + "Value #A": 15, + "Value #B": 16, + "__name__": 1, + "container": 2, + "customresource_group": 3, + "customresource_kind": 4, + "customresource_version": 5, + "exported_namespace": 7, + "instance": 8, + "job": 9, + "name": 6, + "namespace": 10, + "prometheus": 11, + "target_group": 12, + "target_kind": 13, + "target_name": 14 + }, + "renameByName": { + "Value #A": "", + "customresource_kind": "Kind", + "exported_namespace": "Namespace", + "name": "Name", + "target_kind": "Target Kind", + "target_name": "Target Name" + } + } + } + ], + "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": 84 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": 129 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 197 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Target Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": 143 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Target Name" + }, + "properties": [ + { + "id": "custom.width" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 118, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_tlspolicy_target_info{target_kind!=\"Gateway\"}", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_ratelimitpolicy_target_info{target_kind!=\"Gateway\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_authpolicy_target_info{target_kind!=\"Gateway\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_dnspolicy_target_info{target_kind!=\"Gateway\"}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "D" + } + ], + "title": "Route Policies", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "Value #A": true, + "Value #B": true, + "__name__": true, + "container": true, + "customresource_group": true, + "customresource_version": true, + "instance": true, + "job": true, + "namespace": true, + "prometheus": true, + "target_group": true + }, + "indexByName": { + "Time": 0, + "Value #A": 15, + "Value #B": 16, + "__name__": 1, + "container": 2, + "customresource_group": 3, + "customresource_kind": 4, + "customresource_version": 5, + "exported_namespace": 7, + "instance": 8, + "job": 9, + "name": 6, + "namespace": 10, + "prometheus": 11, + "target_group": 12, + "target_kind": 13, + "target_name": 14 + }, + "renameByName": { + "Value #A": "", + "customresource_kind": "Kind", + "exported_namespace": "Namespace", + "name": "Name", + "target_kind": "Target Kind", + "target_name": "Target Name", + "target_namespace": "Target Namespace" + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 130, + "panels": [], + "title": "Constraints and Violations", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P8D9ADF90DB2E3ECF" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-purple", + "mode": "thresholds" + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "deny" + }, + "properties": [ + { + "id": "displayName", + "value": "Deny" + }, + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "warn" + }, + "properties": [ + { + "id": "displayName", + "value": "Warn" + }, + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 0, + "y": 14 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P8D9ADF90DB2E3ECF" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(gatekeeper_violations{enforcement_action=~\"(warn|deny)\"}) by (enforcement_action)", + "instant": false, + "legendFormat": "{{label_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Current number of violations", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P8D9ADF90DB2E3ECF" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Resource in violation" + }, + "properties": [ + { + "id": "custom.width", + "value": 159 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Enforcemant type for violation" + }, + "properties": [ + { + "id": "custom.width", + "value": 214 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Name of resource in violation" + }, + "properties": [ + { + "id": "custom.width", + "value": 210 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Constraint Kind" + }, + "properties": [ + { + "id": "custom.width", + "value": 317 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Constraint Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 282 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace of resource in violation" + }, + "properties": [ + { + "id": "custom.width", + "value": 250 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Violation message" + }, + "properties": [ + { + "id": "custom.width", + "value": 487 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 20, + "x": 4, + "y": 14 + }, + "id": 35, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "P8D9ADF90DB2E3ECF" + }, + "editorMode": "code", + "exemplar": false, + "expr": "opa_scorecard_violations", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Current violations ", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "endpoint": true, + "instance": true, + "job": true, + "namespace": true, + "pod": true, + "prometheus": true, + "service": true + }, + "indexByName": { + "Time": 0, + "Value": 16, + "__name__": 1, + "endpoint": 2, + "instance": 3, + "job": 4, + "kind": 5, + "name": 6, + "namespace": 8, + "pod": 9, + "prometheus": 10, + "service": 11, + "violating_kind": 12, + "violating_name": 13, + "violating_namespace": 14, + "violation_enforcement": 15, + "violation_msg": 7 + }, + "renameByName": { + "kind": "Constraint Kind", + "name": "Constraint Name", + "violating_kind": "Resource in violation", + "violating_name": "Name of resource in violation", + "violating_namespace": "Namespace of resource in violation", + "violation_enforcement": "Enforcemant type for violation", + "violation_msg": "Violation message" + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 132, + "panels": [], + "title": "APIs", + "type": "row" + }, + { + "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": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 97, + "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_httproute_hostname_info{}", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gatewayapi_httproute_labels{}", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + } + ], + "title": "APIs", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "name" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time 1": true, + "Time 2": true, + "Value #A": true, + "Value #B": true, + "__name__ 1": true, + "__name__ 2": true, + "container 1": true, + "container 2": true, + "customresource_group 1": true, + "customresource_group 2": true, + "customresource_kind 1": true, + "customresource_kind 2": true, + "customresource_version 1": true, + "customresource_version 2": true, + "exported_namespace 2": true, + "instance 1": true, + "instance 2": true, + "job 1": true, + "job 2": true, + "namespace 1": true, + "namespace 2": true, + "prometheus 1": true, + "prometheus 2": true + }, + "indexByName": { + "Time 1": 1, + "Time 2": 14, + "Value #A": 13, + "Value #B": 26, + "__name__ 1": 2, + "__name__ 2": 15, + "container 1": 3, + "container 2": 16, + "customresource_group 1": 4, + "customresource_group 2": 17, + "customresource_kind 1": 5, + "customresource_kind 2": 18, + "customresource_version 1": 6, + "customresource_version 2": 19, + "deployment": 20, + "exported_namespace 1": 8, + "exported_namespace 2": 21, + "hostname": 7, + "instance 1": 9, + "instance 2": 22, + "job 1": 10, + "job 2": 23, + "name": 0, + "namespace 1": 11, + "namespace 2": 24, + "prometheus 1": 12, + "prometheus 2": 25 + }, + "renameByName": { + "Time 1": "", + "deployment": "Service Name", + "exported_namespace 1": "Namespace", + "exported_namespace 2": "", + "hostname": "Hostname", + "name": "Name", + "owner": "Owner" + } + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Name", + "Hostname", + "Namespace", + "Service Name", + "owner" + ] + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 120, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(istio_requests_total[5m])) by (destination_workload) * on(destination_workload) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_workload\", \"$1\",\"deployment\", \"(.+)\")", + "legendFormat": "API: {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "API Traffic Summary (requests/sec)", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "thanos-query", + "value": "thanos-query" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Platform Engineer Dashboard", + "uid": "djqDaDISk", + "version": 1, + "weekStart": "" +}