GoDoxy/examples/grafana_template.json
2024-11-10 06:53:31 +08:00

1002 lines
No EOL
34 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1,
"links": [],
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"fieldMinMax": false,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 7,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {},
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.3.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "entrypoint_num_reverse_proxies",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": true,
"legendFormat": "Reverse Proxies",
"range": false,
"refId": "Num rps",
"useBackend": false
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "entrypoint_num_streams",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
"instant": true,
"legendFormat": "Streams",
"range": false,
"refId": "Num streams",
"useBackend": false
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"disableTextWrap": false,
"editorMode": "code",
"exemplar": false,
"expr": "sum by (service) (count(service_health_status >= 8))",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
"instant": true,
"legendFormat": "Unhealthy",
"range": false,
"refId": "unhealthy",
"useBackend": false
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "router_http_req_total",
"format": "time_series",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "Requests Processed",
"range": true,
"refId": "Req total",
"useBackend": false
}
],
"title": "Running Services",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 7,
"x": 7,
"y": 0
},
"id": 5,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.3.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "process_network_receive_bytes_total",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "Received",
"range": true,
"refId": "Bytes Received",
"useBackend": false
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "process_network_transmit_bytes_total",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "Sent",
"range": true,
"refId": "Bytes Sent",
"useBackend": false
}
],
"title": "Network",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"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": 100
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 10,
"x": 14,
"y": 0
},
"id": 6,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "go_memstats_sys_bytes",
"format": "time_series",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Memory Usage",
"type": "timeseries"
},
{
"datasource": {
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 20
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 7,
"x": 0,
"y": 6
},
"id": 2,
"options": {
"displayMode": "gradient",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"maxVizHeight": 300,
"minVizHeight": 22,
"minVizWidth": 8,
"namePlacement": "left",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "sum by(service) (router_http_req_ok_count)",
"format": "time_series",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "",
"legendFormat": "__auto",
"range": true,
"refId": "http ok reqs",
"useBackend": false
}
],
"title": "2xx-3xx Requests Processed",
"type": "bargauge"
},
{
"datasource": {
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 20
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 4,
"x": 7,
"y": 6
},
"id": 3,
"options": {
"displayMode": "gradient",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"maxVizHeight": 300,
"minVizHeight": 22,
"minVizWidth": 8,
"namePlacement": "left",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"text": {
"titleSize": 12,
"valueSize": 12
},
"valueMode": "color"
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "sum by(service) (router_http_req_4xx_count)",
"format": "time_series",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "",
"legendFormat": "__auto",
"range": true,
"refId": "http 4xx reqs",
"useBackend": false
}
],
"title": "4xx Requests Processed",
"type": "bargauge"
},
{
"datasource": {
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 20
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 4,
"x": 11,
"y": 6
},
"id": 8,
"options": {
"displayMode": "gradient",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"maxVizHeight": 300,
"minVizHeight": 22,
"minVizWidth": 8,
"namePlacement": "left",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"text": {
"titleSize": 16,
"valueSize": 16
},
"valueMode": "color"
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "sum by(service) (router_http_req_5xx_count)",
"format": "time_series",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "",
"legendFormat": "__auto",
"range": true,
"refId": "http 5xx reqs",
"useBackend": false
}
],
"title": "5xx Requests Processed",
"type": "bargauge"
},
{
"datasource": {
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#EAB839",
"value": 250
},
{
"color": "semi-dark-red",
"value": 500
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 9,
"x": 15,
"y": 6
},
"id": 4,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {
"titleSize": 12,
"valueSize": 16
},
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "quantile by(service) (0.95, router_http_req_elapsed_ms)",
"format": "time_series",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "",
"legendFormat": "__auto",
"range": true,
"refId": "http req elapsed 99%",
"useBackend": false
}
],
"title": "Requests Time Elapsed 95th Percentile",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "dark-yellow",
"value": 50
},
{
"color": "dark-red",
"value": 99
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 6,
"x": 0,
"y": 16
},
"id": 7,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {
"titleSize": 12,
"valueSize": 20
},
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "topk(10, sum by(visitor) (router_http_req_ok_count))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Top 10 Visitors' Requests",
"transformations": [
{
"id": "limit",
"options": {
"limitField": "10"
}
}
],
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "be32dnz8jkvlsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"fillOpacity": 100,
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineWidth": 0,
"spanNulls": true
},
"mappings": [
{
"options": {
"0": {
"color": "text",
"index": 0,
"text": "UNKNOWN"
},
"2": {
"color": "green",
"index": 1,
"text": "UP"
},
"4": {
"color": "yellow",
"index": 2,
"text": "NAPPING"
},
"8": {
"color": "purple",
"index": 3,
"text": "STARTING"
},
"16": {
"color": "red",
"index": 4,
"text": "DOWN"
},
"32": {
"color": "semi-dark-red",
"index": 5,
"text": "ERROR"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "text",
"value": null
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byValue",
"options": {
"op": "eq",
"reducer": "lastNotNull",
"value": 0
}
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "text",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byValue",
"options": {
"op": "eq",
"reducer": "lastNotNull",
"value": 2
}
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-green",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byValue",
"options": {
"op": "eq",
"reducer": "lastNotNull",
"value": 4
}
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-yellow",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byValue",
"options": {
"op": "eq",
"reducer": "lastNotNull",
"value": 8
}
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byValue",
"options": {
"op": "eq",
"reducer": "lastNotNull",
"value": 16
}
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byValue",
"options": {
"op": "eq",
"reducer": "lastNotNull",
"value": 32
}
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "super-light-red",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 18,
"x": 6,
"y": 16
},
"id": 9,
"interval": "1s",
"options": {
"alignValue": "left",
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"mergeValues": true,
"perPage": 5,
"rowHeight": 0.5,
"showValue": "never",
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.3.0",
"targets": [
{
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "sum by(service) (label_replace(service_health_status, \"service\", \"$2\", \"service\", \"(.+)/(.+)\"))",
"format": "heatmap",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "{{label_name}}",
"range": true,
"refId": "health",
"useBackend": false
}
],
"title": "Service Health",
"type": "state-timeline"
}
],
"preload": false,
"refresh": "auto",
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-15m",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "GoDoxy Dashboard",
"uid": "be32h12hhd534b",
"version": 94,
"weekStart": ""
}