categraf/inputs/haproxy/dashboard.json

715 lines
26 KiB
JSON

{
"name": "HAProxy By Categraf",
"tags": "",
"ident": "",
"configs": {
"version": "2.0.0",
"links": [
{
"title": "GitHub",
"url": "https://github.com/rfmoz/grafana-dashboards",
"targetBlank": true
},
{
"title": "Grafana",
"url": "https://grafana.com/grafana/dashboards/12693-haproxy-2-full/",
"targetBlank": true
}
],
"var": [
{
"name": "ident",
"type": "query",
"datasource": {
"cate": "prometheus"
},
"definition": "label_values(haproxy_up,ident)",
"reg": "",
"multi": false
},
{
"name": "frontend",
"type": "query",
"datasource": {
"cate": "prometheus"
},
"definition": "label_values(haproxy_frontend_bytes_in_total{ident=\"$ident\"}, frontend)",
"reg": "",
"multi": true,
"allOption": true
},
{
"name": "backend",
"type": "query",
"datasource": {
"cate": "prometheus"
},
"definition": "label_values(haproxy_backend_bytes_in_total{ident=\"$ident\"}, backend)",
"reg": "",
"multi": true,
"allOption": true
},
{
"name": "server",
"type": "query",
"datasource": {
"cate": "prometheus"
},
"definition": "label_values(haproxy_server_bytes_in_total{ident=\"$ident\", backend=~\"$backend\"}, server)",
"reg": "",
"multi": true,
"allOption": true
},
{
"name": "code",
"type": "query",
"datasource": {
"cate": "prometheus"
},
"definition": "label_values(haproxy_server_http_responses_total{ident=\"$ident\",backend=~\"$backend\", server=~\"$server\"}, code)",
"reg": "",
"multi": true,
"allOption": true
}
],
"panels": [
{
"type": "stat",
"id": "3895acd5-4825-4ea6-b120-383b9b96d8de",
"layout": {
"h": 6,
"w": 2,
"x": 0,
"y": 0,
"i": "3895acd5-4825-4ea6-b120-383b9b96d8de",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "A",
"expr": "haproxy_up"
}
],
"name": "Stats API UP?",
"links": [],
"custom": {
"textMode": "value",
"colorMode": "background",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"valueMappings": [
{
"type": "special",
"result": {
"color": "#2c9d3d",
"text": "UP"
},
"match": {
"special": 1
}
},
{
"type": "special",
"result": {
"color": "#ce4f52",
"text": "DOWN"
},
"match": {
"special": 0
}
}
],
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
}
},
{
"type": "table",
"id": "f98cd0f9-9979-4f4d-807f-757241d72d06",
"layout": {
"h": 6,
"w": 5,
"x": 2,
"y": 0,
"i": "39b7c4ea-e19d-45b2-8a02-35b6cd1a0348",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "A",
"expr": "haproxy_backend_up{ident=\"$ident\"}"
}
],
"name": "Backends UP?",
"links": [],
"custom": {
"showHeader": true,
"colorMode": "value",
"calc": "lastNotNull",
"displayMode": "labelsOfSeriesToRows",
"columns": [
"backend",
"value"
]
},
"options": {
"valueMappings": [
{
"type": "special",
"result": {
"color": "#2c9d3d",
"text": "UP"
},
"match": {
"special": 1
}
},
{
"type": "range",
"result": {
"color": "#e91515",
"text": "DOWN"
},
"match": {
"to": 0
}
}
],
"standardOptions": {}
},
"overrides": [
{}
]
},
{
"type": "table",
"id": "fb61f168-1f3e-4385-93e8-2bb168e01945",
"layout": {
"h": 6,
"w": 5,
"x": 7,
"y": 0,
"i": "18fdab37-131a-4f24-8f0f-c173d5c8c9f9",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "A",
"expr": "haproxy_server_up{ident=\"$ident\"}"
}
],
"name": "Servers UP?",
"links": [],
"custom": {
"showHeader": true,
"colorMode": "value",
"calc": "lastNotNull",
"displayMode": "labelsOfSeriesToRows",
"columns": [
"backend",
"server",
"value"
]
},
"options": {
"valueMappings": [
{
"type": "special",
"result": {
"color": "#2c9d3d",
"text": "UP"
},
"match": {
"special": 1
}
},
{
"type": "special",
"result": {
"color": "#e91515",
"text": "DOWN"
},
"match": {
"to": 0,
"special": 0
}
}
],
"standardOptions": {}
},
"overrides": [
{}
]
},
{
"type": "timeseries",
"id": "aeeb951c-a4d6-4b0e-918e-2f81c2f3b3be",
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 0,
"i": "aeeb951c-a4d6-4b0e-918e-2f81c2f3b3be",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "B",
"expr": "sum(haproxy_frontend_current_sessions{frontend=~\"$frontend\",ident=\"$ident\"}) by (frontend)",
"legend": "Front-{{frontend}}"
},
{
"refId": "A",
"expr": "sum(haproxy_backend_current_sessions{backend=~\"$backend\",ident=\"$ident\"}) by (backend)",
"legend": "Back-{{backend}}"
}
],
"name": "Active sessions",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "96ca72c3-745e-458a-902f-fd3841b5453d",
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 6,
"i": "96ca72c3-745e-458a-902f-fd3841b5453d",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "B",
"expr": "sum(rate(haproxy_frontend_http_responses_total{frontend=~\"$frontend\",code=~\"$code\",ident=\"$ident\"}[5m])) by (code)",
"legend": "{{ code }}"
}
],
"name": "Frontend responses by code",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "cbadd1e1-25e2-41bd-9fe2-f5e932753c02",
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 6,
"i": "e9d01556-c4d0-4c2e-b555-97f0d99f7f6a",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "B",
"expr": "sum(rate(haproxy_backend_http_responses_total{backend=~\"$backend\",code=~\"$code\",ident=\"$ident\"}[5m])) by (code)",
"legend": "{{ code }}"
}
],
"name": "Backend responses by code",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "bb9db80d-7f9c-4b6b-8434-24e3ec480d5b",
"layout": {
"h": 6,
"w": 12,
"x": 0,
"y": 12,
"i": "bb9db80d-7f9c-4b6b-8434-24e3ec480d5b",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "A",
"expr": "sum(rate(haproxy_frontend_bytes_in_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])*8) by (frontend)",
"legend": "IN {{frontend}}"
},
{
"refId": "B",
"expr": "-sum(rate(haproxy_frontend_bytes_out_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])*8) by (frontend)",
"legend": "OUT {{frontend}}"
}
],
"name": "Incoming / Outgoing bits (Frontend)",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "bitsIEC"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "6ab18da8-c354-4349-b25b-a50cdb02aae8",
"layout": {
"h": 6,
"w": 12,
"x": 12,
"y": 12,
"i": "299e6721-990a-4070-afdd-6f6e402ca3af",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "A",
"expr": "sum(rate(haproxy_backend_bytes_in_total{backend=~\"$backend\",ident=\"$ident\"}[5m])*8) by (backend)",
"legend": "IN {{backend}}"
},
{
"refId": "B",
"expr": "-sum(rate(haproxy_backend_bytes_out_total{backend=~\"$backend\",ident=\"$ident\"}[5m])*8) by (backend)",
"legend": "OUT {{backend}}"
}
],
"name": "Incoming / Outgoing bits(Backend)",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "bitsIEC"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "5805c4b5-66c9-40d2-846d-4acc8a434ecd",
"layout": {
"h": 7,
"w": 12,
"x": 0,
"y": 18,
"i": "5805c4b5-66c9-40d2-846d-4acc8a434ecd",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "A",
"expr": "sum(rate(haproxy_frontend_http_requests_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])) by (frontend)",
"legend": "Front requests - {{frontend}}"
},
{
"refId": "C",
"expr": "sum(rate(haproxy_frontend_request_errors_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])) by (frontend)",
"legend": "Front requests errors - {{frontend}}"
},
{
"refId": "F",
"expr": "sum(rate(haproxy_frontend_requests_denied_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])) by (frontend)",
"legend": "Front request denied - {{frontend}}"
}
],
"name": "Frontend Requests",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "d1d2d177-eab6-43f5-a778-7999c6cd646c",
"layout": {
"h": 7,
"w": 12,
"x": 12,
"y": 18,
"i": "5530a396-b52e-491b-8ca2-4c18ebf9c3f2",
"isResizable": true
},
"version": "2.0.0",
"datasourceCate": "prometheus",
"targets": [
{
"refId": "D",
"expr": "sum(rate(haproxy_backend_redispatch_warnings_total{backend=~\"$backend\",ident=\"$ident\"}[5m])) by (backend)",
"legend": "Back redispatch warnings + {{backend}}"
},
{
"refId": "E",
"expr": "sum(rate(haproxy_backend_retry_warnings_total{backend=~\"$backend\",ident=\"$ident\"}[5m])) by (backend)",
"legend": "Back retry warnings + {{backend}}"
},
{
"refId": "I",
"expr": "sum(rate(haproxy_backend_response_errors_total{backend=~\"$backend\",ident=\"$ident\"}[5m])) by (backend)",
"legend": "Back response errors + {{backend}}"
},
{
"refId": "G",
"expr": "sum(haproxy_backend_current_queue{backend=~\"$backend\",ident=\"$host\"}) by (backend)",
"legend": "Back queued requests + {{backend}}"
},
{
"expr": "sum(rate(haproxy_backend_connection_errors_total{backend=~\"$backend\", ident=\"$ident\"}[5m])) by (backend)",
"refId": "A",
"legend": "Back conn errors + {{backend}}"
}
],
"name": "Backend Requests",
"links": [],
"description": "",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "green",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 1,
"fillOpacity": 0.2,
"gradientMode": "none",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
}
]
}
}