Skip to content

Instantly share code, notes, and snippets.

@elessar-ch
Created February 23, 2021 20:46
Show Gist options
  • Save elessar-ch/42f0eb278aedd27d3b20f4ea490902c7 to your computer and use it in GitHub Desktop.
Save elessar-ch/42f0eb278aedd27d3b20f4ea490902c7 to your computer and use it in GitHub Desktop.
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 8,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 8,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 4,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rate(container_cpu_user_seconds_total{namespace=\"awesome-node\", pod=~\"awesome-node-.*\", container=\"\"}[3m])*1000",
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{pod}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Awesome Node Pod CPU",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": "millicores",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 8,
"x": 8,
"y": 0
},
"hiddenSeries": false,
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "container_memory_working_set_bytes{namespace=\"awesome-node\", pod=~\"awesome-node-.*\", container=\"\"}",
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{pod}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Awesome Node Pod Memory",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 16,
"y": 0
},
"id": 23,
"options": {
"displayMode": "gradient",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.5",
"targets": [
{
"expr": "sum by (le) (rate(http_request_duration_seconds_bucket{app=\"awesome-node\"}[$__rate_interval]))",
"format": "heatmap",
"instant": false,
"interval": "",
"intervalFactor": 10,
"legendFormat": "{{le}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Awesome Node Reqeust Duration Summary",
"type": "bargauge"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 9
},
"hiddenSeries": false,
"id": 12,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum by (app) (rate(http_request_duration_seconds_count{app=\"awesome-node\"}[2m]))",
"interval": "",
"legendFormat": "{{app}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Awesome Node - Requests Per Second",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "reqps",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"cards": {
"cardPadding": null,
"cardRound": null
},
"color": {
"cardColor": "#FADE2A",
"colorScale": "sqrt",
"colorScheme": "interpolateOranges",
"exponent": 0.3,
"max": null,
"mode": "opacity"
},
"dataFormat": "tsbuckets",
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 9
},
"heatmap": {},
"hideZeroBuckets": true,
"highlightCards": true,
"id": 22,
"legend": {
"show": true
},
"pluginVersion": "7.3.5",
"reverseYBuckets": false,
"targets": [
{
"expr": "label_replace(sum by (le) (increase(http_request_duration_seconds_bucket{app=\"awesome-node\"}[$__rate_interval])), \"le\", \"Inf\", \"le\", \"\\\\+Inf\")",
"format": "heatmap",
"instant": false,
"interval": "",
"intervalFactor": 10,
"legendFormat": "{{le}} ",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Awesome Node Reqeust Duration Heatmap",
"tooltip": {
"show": true,
"showHistogram": false
},
"transformations": [],
"type": "heatmap",
"xAxis": {
"show": true
},
"xBucketNumber": null,
"xBucketSize": null,
"yAxis": {
"decimals": 2,
"format": "s",
"logBase": 1,
"max": null,
"min": null,
"show": true,
"splitFactor": null
},
"yBucketBound": "middle",
"yBucketNumber": null,
"yBucketSize": null
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "#EAB839",
"value": 99
},
{
"color": "green",
"value": 99.9
}
]
},
"unit": "%"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 16,
"y": 9
},
"id": 26,
"interval": "1m",
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.3.5",
"targets": [
{
"expr": "(sum by (app) (increase(http_request_duration_seconds_bucket{app=\"awesome-node\", le=\"0.3\"}[1d])) / sum by (app) (increase(http_request_duration_seconds_count{app=\"awesome-node\"}[1d]))) * 100",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Percentage of requests shorter than 0.3 seconds",
"type": "stat"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 17
},
"hiddenSeries": false,
"id": 8,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum by (le) (rate(http_request_duration_seconds_bucket{kubernetes_namespace=\"awesome-node\"}[3m]))\n",
"interval": "",
"legendFormat": "Requests > {{le}}s per second",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Awesome Node Request Duration (Stacked All Buckets)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 17
},
"hiddenSeries": false,
"id": 20,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"0.003\"}[3m]))",
"hide": true,
"interval": "",
"legendFormat": "t < 0.003",
"refId": "A"
},
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"0.03\"}[3m])) - sum (rate(http_request_duration_seconds_bucket{le=\"0.003\"}[3m]))",
"interval": "",
"legendFormat": "0.003 < t < 0.03",
"refId": "B"
},
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"0.1\"}[3m])) - sum (rate(http_request_duration_seconds_bucket{le=\"0.03\"}[3m]))",
"interval": "",
"legendFormat": "0.03 < t < 0.1",
"refId": "C"
},
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"0.3\"}[3m])) - sum (rate(http_request_duration_seconds_bucket{le=\"0.1\"}[3m]))",
"interval": "",
"legendFormat": "0.1 < t < 0.3",
"refId": "D"
},
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"1.5\"}[3m])) - sum (rate(http_request_duration_seconds_bucket{le=\"0.3\"}[3m]))",
"interval": "",
"legendFormat": "0.3 < t < 1.5",
"refId": "E"
},
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"10\"}[3m])) - sum (rate(http_request_duration_seconds_bucket{le=\"1.5\"}[3m]))",
"interval": "",
"legendFormat": "1.5 < t < 10",
"refId": "F"
},
{
"expr": "sum (rate(http_request_duration_seconds_bucket{le=\"+Inf\"}[3m])) - sum (rate(http_request_duration_seconds_bucket{le=\"10\"}[3m]))",
"interval": "",
"legendFormat": "10 < t",
"refId": "G"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Awesome Node Request Duration (Unstacked Buckets)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "yellow",
"value": null
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 3
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 16,
"y": 17
},
"id": 28,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"last"
],
"fields": "",
"values": false
},
"textMode": "value_and_name"
},
"pluginVersion": "7.3.5",
"targets": [
{
"expr": "increase(kube_pod_container_status_restarts_total{namespace=\"awesome-node\"}[3h]) > 0",
"interval": "",
"legendFormat": "{{pod}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Container Restarts (last 3h)",
"type": "stat"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 25
},
"hiddenSeries": false,
"id": 29,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum by (app, le) (rate(http_request_duration_seconds_count{kubernetes_namespace=\"awesome-node\"}[3m]) - ignoring (le) group_right rate(http_request_duration_seconds_bucket{le!=\"+Inf\"}[3m]))",
"interval": "",
"legendFormat": "Requests > {{le}}s per second",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Awesome Node Request Duration (Stacked Buckets)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 99
}
]
},
"unit": "%"
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 25
},
"hiddenSeries": false,
"id": 27,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "(sum by (app) (rate(http_request_duration_seconds_bucket{app=\"awesome-node\", le=\"0.3\"}[2m])) / sum by (app) (rate(http_request_duration_seconds_count{app=\"awesome-node\"}[2m]))) * 100",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "critical",
"fill": true,
"line": true,
"op": "lt",
"value": 99,
"yaxis": "left"
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Percentage of requests shorter than 0.3 seconds",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "%",
"label": null,
"logBase": 1,
"max": "100",
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": false,
"schemaVersion": 26,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"timepicker": {},
"timezone": "",
"title": "NodeJS Starter Dashboard"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment