From 3417faa091beca45bf96a6a69e136bb46f203b3b Mon Sep 17 00:00:00 2001 From: Jirka Kremser Date: Mon, 3 Oct 2022 14:26:14 +0200 Subject: [PATCH 1/4] Add k8gb custom dashboards for Grafana Signed-off-by: Jirka Kremser --- PROJECT | 10 +- deploy/grafana/values.yaml | 11 +- grafana/README.md | 10 + grafana/controller-resources-metrics.json | 306 ++++++++ grafana/controller-runtime-metrics.json | 710 ++++++++++++++++++ grafana/custom-metrics/config.yaml | 29 + .../pretty-custom-metrics-dashboard.json | 580 ++++++++++++++ 7 files changed, 1646 insertions(+), 10 deletions(-) create mode 100644 grafana/README.md create mode 100644 grafana/controller-resources-metrics.json create mode 100644 grafana/controller-runtime-metrics.json create mode 100644 grafana/custom-metrics/config.yaml create mode 100644 grafana/custom-metrics/pretty-custom-metrics-dashboard.json diff --git a/PROJECT b/PROJECT index f016e9fe07..dc9ba9f303 100644 --- a/PROJECT +++ b/PROJECT @@ -1,5 +1,10 @@ domain: absa.oss -layout: go.kubebuilder.io/v2 +layout: +- go.kubebuilder.io/v3 +plugins: + grafana.kubebuilder.io/v1-alpha: {} + manifests.sdk.operatorframework.io/v2: {} + scorecard.sdk.operatorframework.io/v2: {} projectName: k8gb repo: github.com/k8gb-io/k8gb resources: @@ -7,6 +12,3 @@ resources: kind: Gslb version: v1beta1 version: "3" -plugins: - manifests.sdk.operatorframework.io/v2: {} - scorecard.sdk.operatorframework.io/v2: {} diff --git a/deploy/grafana/values.yaml b/deploy/grafana/values.yaml index e28f2eb351..06b5dd0c92 100644 --- a/deploy/grafana/values.yaml +++ b/deploy/grafana/values.yaml @@ -12,12 +12,11 @@ datasources: datasources.yaml: apiVersion: 1 datasources: - # use this proxied datasource for single cluster deployment - # - name: Prometheus - # type: prometheus - # url: http://prometheus-server.k8gb.svc.cluster.local:9090 - # access: proxy - # isDefault: true + - name: Prometheus + type: prometheus + url: http://k3d-test-gslb1-agent-0:30090 + access: proxy + isDefault: true - name: Prometheus-cluster1 type: prometheus url: http://localhost:9080 diff --git a/grafana/README.md b/grafana/README.md new file mode 100644 index 0000000000..b93a093b58 --- /dev/null +++ b/grafana/README.md @@ -0,0 +1,10 @@ +## Sample Grafana Dashboards + +This directory contains semi-generated dashboards for Grafana. It's using kubebuilder's +plugin introduced in [pr #2858](https://github.com/kubernetes-sigs/kubebuilder/pull/2858). + +In order to modify the custom metrics, change the config in [`custom-metrics/config.yaml`](./custom-metrics/config.yaml) and in project root run: + +```bash +kubebuilder edit --plugins grafana.kubebuilder.io/v1-alpha +``` diff --git a/grafana/controller-resources-metrics.json b/grafana/controller-resources-metrics.json new file mode 100644 index 0000000000..629e0d3c9b --- /dev/null +++ b/grafana/controller-resources-metrics.json @@ -0,0 +1,306 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- 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, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "rate(process_cpu_seconds_total{job=\"$job\", namespace=\"$namespace\", pod=\"$pod\"}[5m]) * 100", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Pod: {{pod}} | Container: {{container}}", + "refId": "A", + "step": 10 + } + ], + "title": "Controller CPU Usage", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 4, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "process_resident_memory_bytes{job=\"$job\", namespace=\"$namespace\", pod=\"$pod\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Pod: {{pod}} | Container: {{container}}", + "refId": "A", + "step": 10 + } + ], + "title": "Controller Memory Usage", + "type": "timeseries" + } + ], + "refresh": "", + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\"}, job)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\"}, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "observability", + "value": "observability" + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(controller_runtime_reconcile_total, namespace)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total, namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\", job=~\"$job\"}, pod)", + "hide": 2, + "includeAll": true, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\", job=~\"$job\"}, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Controller-Resources-Metrics", + "weekStart": "" +} diff --git a/grafana/controller-runtime-metrics.json b/grafana/controller-runtime-metrics.json new file mode 100644 index 0000000000..70023a42d8 --- /dev/null +++ b/grafana/controller-runtime-metrics.json @@ -0,0 +1,710 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], + "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" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 9, + "panels": [], + "title": "Reconciliation Metrics", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Total number of reconciliations per controller", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "cpm" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(controller_runtime_reconcile_total{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, pod)", + "interval": "", + "legendFormat": "{{instance}} {{pod}}", + "range": true, + "refId": "A" + } + ], + "title": "Total Reconciliation Count Per Controller", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Total number of reconciliation errors per controller", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "cpm" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(controller_runtime_reconcile_errors_total{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, pod)", + "interval": "", + "legendFormat": "{{instance}} {{pod}}", + "range": true, + "refId": "A" + } + ], + "title": "Reconciliation Error Count Per Controller", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 11, + "panels": [], + "title": "Work Queue Metrics", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "How long in seconds an item stays in workqueue before being requested", + "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": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "list", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name, le))", + "interval": "", + "legendFormat": "P50 {{name}} {{instance}} ", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "histogram_quantile(0.90, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name, le))", + "hide": false, + "interval": "", + "legendFormat": "P90 {{name}} {{instance}} ", + "refId": "B" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name, le))", + "hide": false, + "interval": "", + "legendFormat": "P99 {{name}} {{instance}} ", + "refId": "C" + } + ], + "title": "Seconds For Items Stay In Queue (before being requested) (P50, P90, P99)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(rate(workqueue_adds_total{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name)", + "interval": "", + "legendFormat": "{{name}} {{instance}}", + "refId": "A" + } + ], + "title": "Work Queue Add Rate", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "How long in seconds processing an item from workqueue takes.", + "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": "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": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(workqueue_work_duration_seconds_bucket{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name, le))", + "interval": "", + "legendFormat": "P50 {{name}} {{instance}} ", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "histogram_quantile(0.90, sum(rate(workqueue_work_duration_seconds_bucket{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name, le))", + "hide": false, + "interval": "", + "legendFormat": "P90 {{name}} {{instance}} ", + "refId": "B" + }, + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "histogram_quantile(0.99, sum(rate(workqueue_work_duration_seconds_bucket{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name, le))", + "hide": false, + "interval": "", + "legendFormat": "P99 {{name}} {{instance}} ", + "refId": "C" + } + ], + "title": "Seconds Processing Items From WorkQueue (P50, P90, P99)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "Total number of retries handled by workqueue", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(rate(workqueue_retries_total{job=\"$job\", namespace=\"$namespace\"}[5m])) by (instance, name)", + "interval": "", + "legendFormat": "{{name}} {{instance}} ", + "refId": "A" + } + ], + "title": "Work Queue Retries Rate", + "type": "timeseries" + } + ], + "refresh": "", + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\"}, job)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\"}, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(controller_runtime_reconcile_total, namespace)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total, namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\", job=~\"$job\"}, pod)", + "hide": 2, + "includeAll": true, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(controller_runtime_reconcile_total{namespace=~\"$namespace\", job=~\"$job\"}, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Controller-Runtime-Metrics", + "weekStart": "" +} diff --git a/grafana/custom-metrics/config.yaml b/grafana/custom-metrics/config.yaml new file mode 100644 index 0000000000..2e03d18429 --- /dev/null +++ b/grafana/custom-metrics/config.yaml @@ -0,0 +1,29 @@ +# Use kubebuilder edit --plugins grafana.kubebuilder.io/v1-alpha to generate the dashboard +--- +customMetrics: + - metric: Total errors per minute + type: counter + unit: cpm + expr: sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\"}[5m])*5*60) by (namespace) + + - metric: Total errors per gslb per minute + type: counter + unit: cpm + expr: sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}[5m])*5*60) by (exported_name) + + # Number of targets in DNS endpoint + - metric: Number of IPs (targets) per dns record + type: gauge + unit: none + expr: sum(k8gb_endpoint_status_num{namespace=~\"$namespace\", job=\"$job\"}) by (dns_name) + + # Number of managed hosts observed by k8gb + - metric: Service status of gslb + type: gauge + unit: none + expr: sum(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}) by (status) + + - metric: k8gb_runtime_info + type: info + unit: none + expr: k8gb_runtime_info diff --git a/grafana/custom-metrics/pretty-custom-metrics-dashboard.json b/grafana/custom-metrics/pretty-custom-metrics-dashboard.json new file mode 100644 index 0000000000..1d58c81cc5 --- /dev/null +++ b/grafana/custom-metrics/pretty-custom-metrics-dashboard.json @@ -0,0 +1,580 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- 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, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "cpm" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24 + }, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\"}[5m])*5*60) by (namespace)", + "format": "time_series", + "legendFormat": "namespace: {{namespace}}", + "interval": "", + "intervalFactor": 2, + "refId": "A", + "step": 10 + } + ], + "title": "Total errors per minute (counter)", + "type": "timeseries" + }, + + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "cpm" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24 + }, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}[5m])*5*60) by (exported_name)", + "format": "time_series", + "legendFormat": "gslb: {{exported_name}}", + "interval": "", + "intervalFactor": 2, + "refId": "A", + "step": 10 + } + ], + "title": "Total errors per gslb per minute (counter)", + "type": "timeseries" + }, + + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24 + }, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(k8gb_endpoint_status_num{namespace=~\"$namespace\", job=\"$job\"}) by (dns_name)", + "format": "time_series", + "legendFormat": "{{label_name}}", + "interval": "", + "intervalFactor": 2, + "refId": "A", + "step": 10 + } + ], + "title": "Number of IPs (targets) per dns record (gauge)", + "type": "timeseries" + }, + + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24 + }, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "sum(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}) by (status)", + "format": "time_series", + "legendFormat": "{{label_name}}", + "interval": "", + "intervalFactor": 2, + "refId": "A", + "step": 10 + } + ], + "title": "Service status of gslb (gauge)", + "type": "barchart" + }, + + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "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": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24 + }, + "interval": "1m", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "exemplar": true, + "expr": "k8gb_runtime_info", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "refId": "A", + "step": 10 + } + ], + "title": "k8gb_runtime_info (info)", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "mode": "rows" + } + } + ], + "type": "table" + } + ], + "refresh": "", + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, job)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "observability", + "value": "observability" + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(k8gb_gslb_service_status_num, namespace)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(k8gb_gslb_service_status_num, namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=~\"$job\"}, pod)", + "hide": 2, + "includeAll": true, + "label": "pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=~\"$job\"}, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, exported_name)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "gslb", + "options": [], + "query": { + "query": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, exported_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Custom-Metrics", + "weekStart": "" +} From d2348d5b066e84659e7d23b80ac4af73e7367ee2 Mon Sep 17 00:00:00 2001 From: Jirka Kremser Date: Tue, 4 Oct 2022 12:59:04 +0200 Subject: [PATCH 2/4] Bump Grafana and Prometheus versions Signed-off-by: Jirka Kremser --- Makefile | 5 +++-- grafana/custom-metrics/config.yaml | 4 ++-- .../pretty-custom-metrics-dashboard.json | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 7fac47485b..827fe9a3cf 100644 --- a/Makefile +++ b/Makefile @@ -265,6 +265,7 @@ deploy-grafana: helm repo update helm -n k8gb upgrade -i grafana grafana/grafana -f deploy/grafana/values.yaml \ --wait --timeout=2m30s \ + --version=6.38.6 \ --kube-context=k3d-$(CLUSTER_NAME)1 kubectl --context k3d-$(CLUSTER_NAME)1 apply -f deploy/grafana/dashboard-cm.yaml -n k8gb @echo -e "\nGrafana is listening on http://localhost:3000\n" @@ -309,7 +310,7 @@ ensure-cluster-size: .PHONY: goreleaser goreleaser: - go install github.com/goreleaser/goreleaser@v1.7.0 + command -v goreleaser &> /dev/null || go install github.com/goreleaser/goreleaser@v1.7.0 .PHONY: release-images release-images: goreleaser @@ -572,7 +573,7 @@ define deploy-prometheus helm repo add prometheus-community https://prometheus-community.github.io/helm-charts ;\ helm repo update ;\ helm -n k8gb upgrade -i prometheus prometheus-community/prometheus -f deploy/prometheus/values.yaml \ - --version 14.2.0 \ + --version 15.14.0 \ --wait --timeout=2m0s \ --kube-context=k3d-$1 endef diff --git a/grafana/custom-metrics/config.yaml b/grafana/custom-metrics/config.yaml index 2e03d18429..3c79a89fab 100644 --- a/grafana/custom-metrics/config.yaml +++ b/grafana/custom-metrics/config.yaml @@ -9,7 +9,7 @@ customMetrics: - metric: Total errors per gslb per minute type: counter unit: cpm - expr: sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}[5m])*5*60) by (exported_name) + expr: sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\", name=\"$gslb\"}[5m])*5*60) by (name) # Number of targets in DNS endpoint - metric: Number of IPs (targets) per dns record @@ -21,7 +21,7 @@ customMetrics: - metric: Service status of gslb type: gauge unit: none - expr: sum(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}) by (status) + expr: sum(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=\"$job\", name=\"$gslb\"}) by (status) - metric: k8gb_runtime_info type: info diff --git a/grafana/custom-metrics/pretty-custom-metrics-dashboard.json b/grafana/custom-metrics/pretty-custom-metrics-dashboard.json index 1d58c81cc5..2c75bfc9be 100644 --- a/grafana/custom-metrics/pretty-custom-metrics-dashboard.json +++ b/grafana/custom-metrics/pretty-custom-metrics-dashboard.json @@ -205,9 +205,9 @@ { "datasource": "${DS_PROMETHEUS}", "exemplar": true, - "expr": "sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}[5m])*5*60) by (exported_name)", + "expr": "sum(rate(k8gb_gslb_errors_total{namespace=~\"$namespace\", job=\"$job\", name=\"$gslb\"}[5m])*5*60) by (name)", "format": "time_series", - "legendFormat": "gslb: {{exported_name}}", + "legendFormat": "gslb: {{name}}", "interval": "", "intervalFactor": 2, "refId": "A", @@ -371,7 +371,7 @@ { "datasource": "${DS_PROMETHEUS}", "exemplar": true, - "expr": "sum(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=\"$job\", exported_name=\"$gslb\"}) by (status)", + "expr": "sum(k8gb_gslb_service_status_num{namespace=~\"$namespace\", job=\"$job\", name=\"$gslb\"}) by (status)", "format": "time_series", "legendFormat": "{{label_name}}", "interval": "", @@ -551,14 +551,14 @@ }, { "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, exported_name)", + "definition": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, name)", "hide": 0, "includeAll": false, "multi": false, "name": "gslb", "options": [], "query": { - "query": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, exported_name)", + "query": "label_values(k8gb_gslb_service_status_num{namespace=~\"$namespace\"}, name)", "refId": "StandardVariableQuery" }, "refresh": 1, From 4d3dbdcbdacae9fed4f0651841abfae57c6c36da Mon Sep 17 00:00:00 2001 From: Jirka Kremser Date: Tue, 4 Oct 2022 13:34:39 +0200 Subject: [PATCH 3/4] Get rid of 'policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+' Signed-off-by: Jirka Kremser --- Makefile | 2 +- deploy/grafana/values.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 827fe9a3cf..6530d56445 100644 --- a/Makefile +++ b/Makefile @@ -264,7 +264,7 @@ deploy-grafana: helm repo add grafana https://grafana.github.io/helm-charts helm repo update helm -n k8gb upgrade -i grafana grafana/grafana -f deploy/grafana/values.yaml \ - --wait --timeout=2m30s \ + --wait --timeout=3m \ --version=6.38.6 \ --kube-context=k3d-$(CLUSTER_NAME)1 kubectl --context k3d-$(CLUSTER_NAME)1 apply -f deploy/grafana/dashboard-cm.yaml -n k8gb diff --git a/deploy/grafana/values.yaml b/deploy/grafana/values.yaml index 06b5dd0c92..1d1e714c15 100644 --- a/deploy/grafana/values.yaml +++ b/deploy/grafana/values.yaml @@ -44,3 +44,7 @@ dashboards: k8s-node-exporter-full: # Node Exporter Full https://grafana.com/grafana/dashboards/1860 url: https://grafana.com/api/dashboards/1860/revisions/23/download +rbac: + pspEnabled: false +testFramework: + enabled: false \ No newline at end of file From ff29bc0be43e9797b6dfcc8393cb00b4e33108c6 Mon Sep 17 00:00:00 2001 From: Jirka Kremser Date: Wed, 5 Oct 2022 14:56:12 +0200 Subject: [PATCH 4/4] Import the dashboards during deploy-grafana makefile target Signed-off-by: Jirka Kremser --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6530d56445..443562eba1 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ check: license lint gokart test ## Check project integrity .PHONY: clean-test-apps clean-test-apps: - kubectl delete -f deploy/test-apps + kubectl delete --ignore-not-found -f deploy/test-apps helm -n test-gslb uninstall frontend # see: https://dev4devs.com/2019/05/04/operator-framework-how-to-debug-golang-operator-projects/ @@ -264,10 +264,17 @@ deploy-grafana: helm repo add grafana https://grafana.github.io/helm-charts helm repo update helm -n k8gb upgrade -i grafana grafana/grafana -f deploy/grafana/values.yaml \ - --wait --timeout=3m \ + --wait --timeout=4m \ --version=6.38.6 \ --kube-context=k3d-$(CLUSTER_NAME)1 kubectl --context k3d-$(CLUSTER_NAME)1 apply -f deploy/grafana/dashboard-cm.yaml -n k8gb + mkdir grafana/dashboards/ || true + cat grafana/controller-resources-metrics.json | sed 's/$${DS_PROMETHEUS}/Prometheus/g' > grafana/dashboards/controller-resources-metrics.json + cat grafana/controller-runtime-metrics.json | sed 's/$${DS_PROMETHEUS}/Prometheus/g' > grafana/dashboards/controller-runtime-metrics.json + cat grafana/custom-metrics/pretty-custom-metrics-dashboard.json | sed 's/$${DS_PROMETHEUS}/Prometheus/g' > grafana/dashboards/pretty-custom-metrics-dashboard.json + kubectl --context k3d-$(CLUSTER_NAME)1 -n k8gb create cm -n k8gb k8gb-dashboards --from-file=./grafana/dashboards/ --dry-run=client -oyaml | kubectl apply --context k3d-$(CLUSTER_NAME)1 -f - + kubectl --context k3d-$(CLUSTER_NAME)1 -n k8gb label cm k8gb-dashboards grafana_dashboard=true --overwrite + rm -rf grafana/dashboards/ @echo -e "\nGrafana is listening on http://localhost:3000\n" @echo -e "🖖 credentials are admin:admin\n" @@ -276,7 +283,8 @@ deploy-grafana: uninstall-grafana: @echo -e "\n$(YELLOW)Local cluster $(CYAN)$(CLUSTER_GSLB1)$(NC)" @echo -e "\n$(YELLOW)uninstall grafana $(NC)" - kubectl --context k3d-$(CLUSTER_NAME)1 delete -f deploy/grafana/dashboard-cm.yaml -n k8gb + kubectl --context k3d-$(CLUSTER_NAME)1 delete --ignore-not-found -f deploy/grafana/dashboard-cm.yaml -n k8gb + kubectl --context k3d-$(CLUSTER_NAME)1 delete cm --ignore-not-found -n k8gb k8gb-dashboards helm uninstall grafana -n k8gb --kube-context=k3d-$(CLUSTER_NAME)1 .PHONY: dns-tools