Created
March 28, 2025 14:03
-
-
Save PhilipSchmid/7598b22cc0498b75276e38240446dfd6 to your computer and use it in GitHub Desktop.
Kubenurse deploy manifest for Kubernetes network latency/issue monitoring (https://github.com/postfinance/kubenurse)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/postfinance/kubenurse | |
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: kubenurse | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: kubenurse | |
namespace: kubenurse | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: kubenurse | |
namespace: kubenurse | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: kubenurse | |
subjects: | |
- kind: ServiceAccount | |
name: kubenurse | |
namespace: kubenurse | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
name: kubenurse | |
namespace: kubenurse | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
verbs: | |
- get | |
- list | |
- watch | |
--- | |
# This resource is not needed if KUBENURSE_ALLOW_UNSCHEDULABLE=true | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: kubenurse | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: kubenurse | |
subjects: | |
- kind: ServiceAccount | |
name: kubenurse | |
namespace: kubenurse | |
--- | |
# This resource is not needed if KUBENURSE_ALLOW_UNSCHEDULABLE=true | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: kubenurse | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- nodes | |
verbs: | |
- list | |
- get | |
- watch | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
app.kubernetes.io/name: kubenurse | |
name: kubenurse | |
namespace: kubenurse | |
spec: | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: kubenurse | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/name: kubenurse | |
annotations: | |
prometheus.io/path: "/metrics" | |
prometheus.io/port: "8080" | |
prometheus.io/scheme: "http" | |
prometheus.io/scrape: "true" | |
spec: | |
serviceAccountName: kubenurse | |
containers: | |
- name: kubenurse | |
env: | |
- name: KUBENURSE_CHECK_ME_INGRESS | |
value: "false" | |
- name: KUBENURSE_SERVICE_URL | |
value: http://kubenurse.kubenurse.svc.cluster.local:8080 | |
- name: KUBENURSE_NAMESPACE | |
value: kubenurse | |
- name: KUBENURSE_NEIGHBOUR_FILTER | |
value: "app.kubernetes.io/name=kubenurse" | |
- name: KUBENURSE_EXTRA_CHECKS | |
value: "google:https://www.google.com/|cloudflare:https://www.cloudflare.com/" | |
image: "postfinance/kubenurse:v1.14.3" | |
ports: | |
- containerPort: 8080 | |
protocol: TCP | |
readinessProbe: | |
failureThreshold: 1 | |
httpGet: | |
path: /ready | |
port: 8080 | |
scheme: HTTP | |
periodSeconds: 3 | |
successThreshold: 1 | |
timeoutSeconds: 1 | |
tolerations: | |
- effect: NoSchedule | |
key: node-role.kubernetes.io/master | |
operator: Equal | |
- effect: NoSchedule | |
key: node-role.kubernetes.io/control-plane | |
operator: Equal | |
--- | |
# This resource is not needed if KUBENURSE_CHECK_ME_SERVICE=false | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app.kubernetes.io/name: kubenurse | |
name: kubenurse | |
namespace: kubenurse | |
spec: | |
ports: | |
- name: 8080-8080 | |
port: 8080 | |
protocol: TCP | |
targetPort: 8080 | |
selector: | |
app.kubernetes.io/name: kubenurse | |
--- | |
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
labels: | |
app.kubernetes.io/name: kubenurse | |
name: kubenurse | |
namespace: kubenurse | |
spec: | |
endpoints: | |
- port: 8080-8080 | |
interval: 15s | |
relabelings: | |
- sourceLabels: [__meta_kubernetes_pod_node_name] | |
separator: ; | |
regex: ^(.*)$ | |
targetLabel: nodename | |
replacement: $1 | |
action: replace | |
namespaceSelector: | |
matchNames: | |
- kubenurse | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: kubenurse | |
# This resource is not needed if KUBENURSE_CHECK_ME_INGRESS=false | |
# --- | |
# apiVersion: networking.k8s.io/v1 | |
# kind: Ingress | |
# metadata: | |
# name: kubenurse | |
# namespace: kubenurse | |
# spec: | |
# ingressClassName: nginx | |
# rules: | |
# - host: kubenurse.example.com | |
# http: | |
# paths: | |
# - pathType: Prefix | |
# path: "/" | |
# backend: | |
# service: | |
# name: kubenurse | |
# port: | |
# number: 8080 | |
# tls: | |
# - hosts: | |
# - kubenurse.example.com | |
# https://github.com/postfinance/kubenurse/blob/main/doc/grafana-kubenurse.json | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: kubenurse-dashboard | |
labels: | |
grafana_dashboard: "1" | |
namespace: kubenurse | |
data: | |
kubenurse-dashboard.json: | | |
{ | |
"__inputs": [ | |
{ | |
"name": "DS_PROMETHEUS", | |
"label": "prometheus", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "prometheus", | |
"pluginName": "Prometheus" | |
} | |
], | |
"__elements": {}, | |
"__requires": [ | |
{ | |
"type": "grafana", | |
"id": "grafana", | |
"name": "Grafana", | |
"version": "10.4.0" | |
}, | |
{ | |
"type": "panel", | |
"id": "heatmap", | |
"name": "Heatmap", | |
"version": "" | |
}, | |
{ | |
"type": "datasource", | |
"id": "prometheus", | |
"name": "Prometheus", | |
"version": "1.0.0" | |
}, | |
{ | |
"type": "panel", | |
"id": "table", | |
"name": "Table", | |
"version": "" | |
}, | |
{ | |
"type": "panel", | |
"id": "timeseries", | |
"name": "Time series", | |
"version": "" | |
} | |
], | |
"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": "Kubenurse network monitoring", | |
"editable": true, | |
"fiscalYearStartMonth": 0, | |
"graphTooltip": 2, | |
"id": null, | |
"links": [], | |
"liveNow": false, | |
"panels": [ | |
{ | |
"collapsed": false, | |
"gridPos": { | |
"h": 1, | |
"w": 24, | |
"x": 0, | |
"y": 0 | |
}, | |
"id": 51, | |
"panels": [], | |
"repeat": "request_type", | |
"repeatDirection": "h", | |
"title": "$request_type", | |
"type": "row" | |
}, | |
{ | |
"cards": {}, | |
"color": { | |
"cardColor": "#b4ff00", | |
"colorScale": "sqrt", | |
"colorScheme": "interpolateSpectral", | |
"exponent": 0.5, | |
"mode": "spectrum" | |
}, | |
"dataFormat": "tsbuckets", | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"description": "Latency heatmap for $request_type requests", | |
"fieldConfig": { | |
"defaults": { | |
"custom": { | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"scaleDistribution": { | |
"type": "linear" | |
} | |
} | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 6, | |
"w": 17, | |
"x": 0, | |
"y": 1 | |
}, | |
"heatmap": {}, | |
"hideZeroBuckets": true, | |
"highlightCards": true, | |
"id": 2, | |
"legend": { | |
"show": true | |
}, | |
"options": { | |
"calculate": false, | |
"calculation": {}, | |
"cellGap": 2, | |
"cellValues": {}, | |
"color": { | |
"exponent": 0.5, | |
"fill": "#b4ff00", | |
"mode": "scheme", | |
"reverse": false, | |
"scale": "exponential", | |
"scheme": "Spectral", | |
"steps": 128 | |
}, | |
"exemplars": { | |
"color": "rgba(255,0,255,0.7)" | |
}, | |
"filterValues": { | |
"le": 1e-9 | |
}, | |
"legend": { | |
"show": true | |
}, | |
"rowsFrame": { | |
"layout": "auto" | |
}, | |
"showValue": "never", | |
"tooltip": { | |
"mode": "single", | |
"showColorScale": false, | |
"yHistogram": false | |
}, | |
"yAxis": { | |
"axisPlacement": "left", | |
"max": "5.5", | |
"reverse": false, | |
"unit": "dtdurations" | |
} | |
}, | |
"pluginVersion": "10.4.0", | |
"reverseYBuckets": false, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": false, | |
"expr": "sum(rate(kubenurse_httpclient_request_duration_seconds_bucket{kubernetes_cluster_name=~\"$cluster\", type=~\"$request_type.*\"}[1m])) by (le)", | |
"format": "heatmap", | |
"instant": false, | |
"interval": "", | |
"intervalFactor": 1, | |
"legendFormat": "{{le}}", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "Requests $request_type", | |
"tooltip": { | |
"show": true, | |
"showHistogram": false | |
}, | |
"type": "heatmap", | |
"xAxis": { | |
"show": true | |
}, | |
"xBucketNumber": 60, | |
"yAxis": { | |
"format": "dtdurations", | |
"logBase": 1, | |
"max": "5.5", | |
"show": true | |
}, | |
"yBucketBound": "auto", | |
"yBucketNumber": 12 | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"description": "Error rate for $request_type type", | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "request errors", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 20, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": false, | |
"lineInterpolation": "linear", | |
"lineWidth": 1, | |
"pointSize": 5, | |
"scaleDistribution": { | |
"type": "linear" | |
}, | |
"showPoints": "never", | |
"spanNulls": false, | |
"stacking": { | |
"group": "A", | |
"mode": "none" | |
}, | |
"thresholdsStyle": { | |
"mode": "off" | |
} | |
}, | |
"links": [], | |
"mappings": [], | |
"noValue": "no error recorded so far", | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "short" | |
}, | |
"overrides": [ | |
{ | |
"matcher": { | |
"id": "byRegexp", | |
"options": "/errors_.*/" | |
}, | |
"properties": [ | |
{ | |
"id": "color", | |
"value": { | |
"fixedColor": "rgb(189, 14, 7)", | |
"mode": "fixed" | |
} | |
} | |
] | |
}, | |
{ | |
"matcher": { | |
"id": "byFrameRefID", | |
"options": "B" | |
}, | |
"properties": [ | |
{ | |
"id": "custom.axisPlacement", | |
"value": "auto" | |
}, | |
{ | |
"id": "custom.lineStyle", | |
"value": { | |
"fill": "solid" | |
} | |
}, | |
{ | |
"id": "custom.fillOpacity", | |
"value": 0 | |
}, | |
{ | |
"id": "color", | |
"value": { | |
"mode": "continuous-BlYlRd", | |
"seriesBy": "last" | |
} | |
} | |
] | |
} | |
] | |
}, | |
"gridPos": { | |
"h": 6, | |
"w": 7, | |
"x": 17, | |
"y": 1 | |
}, | |
"id": 18, | |
"options": { | |
"legend": { | |
"calcs": [ | |
"lastNotNull", | |
"max" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "multi", | |
"sort": "none" | |
} | |
}, | |
"pluginVersion": "8.5.5", | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"expr": "irate(kubenurse_errors_total{type=~\"$request_type.*\",kubernetes_cluster_name=\"$cluster\"}[5m])", | |
"format": "time_series", | |
"hide": false, | |
"intervalFactor": 1, | |
"legendFormat": "errors_{{kubernetes_pod_name}}", | |
"range": true, | |
"refId": "A" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"expr": "sum (irate(kubenurse_errors_total{type=~\"$request_type.*\",kubernetes_cluster_name=\"$cluster\"}[15m]))", | |
"hide": false, | |
"legendFormat": "Sum over all pods", | |
"range": true, | |
"refId": "B" | |
} | |
], | |
"title": "Error rate $request_type", | |
"type": "timeseries" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 0, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": false, | |
"lineInterpolation": "linear", | |
"lineWidth": 1, | |
"pointSize": 5, | |
"scaleDistribution": { | |
"type": "linear" | |
}, | |
"showPoints": "auto", | |
"spanNulls": false, | |
"stacking": { | |
"group": "A", | |
"mode": "none" | |
}, | |
"thresholdsStyle": { | |
"mode": "off" | |
} | |
}, | |
"fieldMinMax": false, | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "s" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 6, | |
"w": 12, | |
"x": 0, | |
"y": 7 | |
}, | |
"id": 30, | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "single", | |
"sort": "none" | |
} | |
}, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "histogram_quantile(0.95, sum(rate(kubenurse_httpclient_request_duration_seconds_bucket{kubernetes_cluster_name=\"$cluster\", type=~\"$request_type.*\"}[5m])) by (le, pod))", | |
"interval": "", | |
"legendFormat": "{{ kubernetes_pod_name }}", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "http request duration by Pod (p0.95)", | |
"type": "timeseries" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"description": "Time in seconds since the start of the http request to complete the action. This is a useful chart to further debug connection issues.", | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 0, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": 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": 6, | |
"w": 12, | |
"x": 12, | |
"y": 7 | |
}, | |
"id": 26, | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "single", | |
"sort": "none" | |
} | |
}, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "histogram_quantile(0.95, sum(kubenurse_httpclient_trace_request_duration_seconds_bucket{kubernetes_cluster_name=\"$cluster\",type=~\"$request_type.*\"}) by (le, event))", | |
"interval": "", | |
"legendFormat": "{{ event }}", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "http request tracing (p0.95)", | |
"type": "timeseries" | |
}, | |
{ | |
"collapsed": false, | |
"gridPos": { | |
"h": 1, | |
"w": 24, | |
"x": 0, | |
"y": 13 | |
}, | |
"id": 61, | |
"panels": [], | |
"title": "Shared information", | |
"type": "row" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 0, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": 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": 8, | |
"w": 12, | |
"x": 0, | |
"y": 14 | |
}, | |
"id": 41, | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max" | |
], | |
"displayMode": "list", | |
"placement": "right", | |
"showLegend": false | |
}, | |
"tooltip": { | |
"mode": "single", | |
"sort": "none" | |
} | |
}, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "histogram_quantile(0.95, sum(kubenurse_httpclient_trace_request_duration_seconds_bucket{kubernetes_cluster_name=\"$cluster\",event=\"dns_done\"}) by (le))\n-\nhistogram_quantile(0.95, sum(kubenurse_httpclient_trace_request_duration_seconds_bucket{kubernetes_cluster_name=\"$cluster\",event=\"dns_start\"}) by (le))", | |
"interval": "", | |
"legendFormat": "p95", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "DNS duration", | |
"type": "timeseries" | |
}, | |
{ | |
"collapsed": false, | |
"datasource": { | |
"type": "prometheus", | |
"uid": "000000210" | |
}, | |
"gridPos": { | |
"h": 1, | |
"w": 24, | |
"x": 0, | |
"y": 22 | |
}, | |
"id": 22, | |
"panels": [], | |
"title": "Debug information", | |
"type": "row" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "thresholds" | |
}, | |
"custom": { | |
"align": "auto", | |
"cellOptions": { | |
"type": "auto" | |
}, | |
"inspect": false | |
}, | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
} | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 8, | |
"w": 12, | |
"x": 0, | |
"y": 23 | |
}, | |
"id": 32, | |
"options": { | |
"cellHeight": "sm", | |
"footer": { | |
"countRows": false, | |
"fields": "", | |
"reducer": [ | |
"sum" | |
], | |
"show": false | |
}, | |
"showHeader": true | |
}, | |
"pluginVersion": "10.4.0", | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "sum (kubenurse_httpclient_requests_total{kubernetes_cluster_name=\"$cluster\"}) by (pod, kubernetes_node)", | |
"format": "table", | |
"instant": true, | |
"interval": "", | |
"legendFormat": "__auto", | |
"refId": "A" | |
} | |
], | |
"title": "http requests by Pod", | |
"transformations": [ | |
{ | |
"id": "organize", | |
"options": { | |
"excludeByName": { | |
"Time": true | |
}, | |
"includeByName": {}, | |
"indexByName": {}, | |
"renameByName": { | |
"Value": "total http requests", | |
"kubernetes_pod_name": "Pod" | |
} | |
} | |
} | |
], | |
"type": "table" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 0, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": 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 | |
} | |
] | |
} | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 8, | |
"w": 12, | |
"x": 12, | |
"y": 23 | |
}, | |
"id": 36, | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "single", | |
"sort": "none" | |
} | |
}, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": false, | |
"expr": "go_goroutines{kubernetes_cluster_name=\"$cluster\", job=\"kubenurse\"}", | |
"hide": false, | |
"legendFormat": "{{ pod }}", | |
"range": true, | |
"refId": "B" | |
} | |
], | |
"title": "Number of goroutines", | |
"type": "timeseries" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 0, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": 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": "decbytes" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 8, | |
"w": 12, | |
"x": 0, | |
"y": 31 | |
}, | |
"id": 38, | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "single", | |
"sort": "none" | |
} | |
}, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"exemplar": false, | |
"expr": "process_resident_memory_bytes{job=\"kubenurse\", kubernetes_cluster_name=\"$cluster\"}", | |
"hide": false, | |
"legendFormat": "{{ pod }}", | |
"range": true, | |
"refId": "B" | |
} | |
], | |
"title": "Memory usage", | |
"type": "timeseries" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisBorderShow": false, | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 0, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"insertNulls": 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 | |
} | |
] | |
} | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 8, | |
"w": 12, | |
"x": 12, | |
"y": 31 | |
}, | |
"id": 44, | |
"options": { | |
"legend": { | |
"calcs": [], | |
"displayMode": "list", | |
"placement": "bottom", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "single", | |
"sort": "none" | |
} | |
}, | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"editorMode": "code", | |
"expr": "process_open_fds{kubernetes_cluster_name=\"$cluster\", job=\"kubenurse\"}", | |
"instant": false, | |
"legendFormat": "{{pod}}", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "Open FDS", | |
"type": "timeseries" | |
} | |
], | |
"refresh": "", | |
"schemaVersion": 39, | |
"tags": [ | |
"kubernetes", | |
"k8s", | |
"network" | |
], | |
"templating": { | |
"list": [ | |
{ | |
"current": { | |
"selected": false, | |
"text": "default", | |
"value": "default" | |
}, | |
"hide": 0, | |
"includeAll": false, | |
"label": "Datasource", | |
"multi": false, | |
"name": "DS_PROMETHEUS", | |
"options": [], | |
"query": "prometheus", | |
"queryValue": "", | |
"refresh": 1, | |
"regex": "", | |
"skipUrlSync": false, | |
"type": "datasource" | |
}, | |
{ | |
"current": {}, | |
"datasource": { | |
"type": "prometheus", | |
"uid": "${DS_PROMETHEUS}" | |
}, | |
"definition": "label_values(kubernetes_cluster_name)", | |
"hide": 0, | |
"includeAll": false, | |
"label": "Cluster", | |
"multi": false, | |
"name": "cluster", | |
"options": [], | |
"query": { | |
"query": "label_values(kubernetes_cluster_name)", | |
"refId": "vm-p1-cluster-Variable-Query" | |
}, | |
"refresh": 1, | |
"regex": "", | |
"skipUrlSync": false, | |
"sort": 1, | |
"tagValuesQuery": "", | |
"tagsQuery": "", | |
"type": "query", | |
"useTags": false | |
}, | |
{ | |
"current": { | |
"selected": true, | |
"text": [ | |
"api_server_direct" | |
], | |
"value": [ | |
"api_server_direct" | |
] | |
}, | |
"hide": 0, | |
"includeAll": true, | |
"label": "Request", | |
"multi": true, | |
"name": "request_type", | |
"options": [ | |
{ | |
"selected": false, | |
"text": "All", | |
"value": "$__all" | |
}, | |
{ | |
"selected": true, | |
"text": "api_server_direct", | |
"value": "api_server_direct" | |
}, | |
{ | |
"selected": false, | |
"text": "api_server_dns", | |
"value": "api_server_dns" | |
}, | |
{ | |
"selected": false, | |
"text": "me_service", | |
"value": "me_service" | |
}, | |
{ | |
"selected": false, | |
"text": "me_ingress", | |
"value": "me_ingress" | |
}, | |
{ | |
"selected": false, | |
"text": "path_", | |
"value": "path_" | |
} | |
], | |
"query": "api_server_direct, api_server_dns, me_service, me_ingress, path_", | |
"queryValue": "", | |
"skipUrlSync": false, | |
"type": "custom" | |
} | |
] | |
}, | |
"time": { | |
"from": "now-30m", | |
"to": "now" | |
}, | |
"timepicker": { | |
"refresh_intervals": [ | |
"5s", | |
"10s", | |
"30s", | |
"1m", | |
"5m", | |
"15m", | |
"30m", | |
"1h", | |
"2h", | |
"1d" | |
], | |
"time_options": [ | |
"5m", | |
"15m", | |
"1h", | |
"6h", | |
"12h", | |
"24h", | |
"2d", | |
"7d", | |
"30d" | |
] | |
}, | |
"timezone": "", | |
"title": "Kubenurse", | |
"uid": "kubenurse", | |
"version": 8, | |
"weekStart": "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment