This commit is contained in:
Chu Văn Hải committed 2026-06-18 00:01:35 +07:00
1 parent b68632a50e
commit 31eb2d296d
9 files changed
+12022

No files matched your search

@@ -0,0 +1,160 @@
{
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": true,
"panels": [
{
"id": 1,
"title": "Request Rate (RPS)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"targets": [
{
"expr": "sum(rate({container=\"apisix-gateway\"}[$__interval]))",
"legendFormat": "Requests / Sec",
"datasource": {
"type": "loki",
"uid": "Loki"
}
}
],
"fieldConfig": {
"defaults": {
"unit": "reqps"
}
}
},
{
"id": 2,
"title": "Average Response Time (Latency)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"targets": [
{
"expr": "avg(avg_over_time({container=\"apisix-gateway\"} | json | unwrap request_time [$__interval]))",
"legendFormat": "Avg Latency",
"datasource": {
"type": "loki",
"uid": "Loki"
}
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth"
}
}
}
},
{
"id": 3,
"title": "HTTP Status Distribution",
"type": "bargauge",
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 8
},
"targets": [
{
"expr": "sum by(status) (count_over_time({container=\"apisix-gateway\"} | json [$__interval]))",
"legendFormat": "HTTP {{status}}",
"datasource": {
"type": "loki",
"uid": "Loki"
}
}
],
"options": {
"orientation": "horizontal",
"displayMode": "basic"
}
},
{
"id": 4,
"title": "Data Egress (Throughput)",
"type": "timeseries",
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 8
},
"targets": [
{
"expr": "sum(rate({container=\"apisix-gateway\"} | json | unwrap body_bytes_sent [$__interval]))",
"legendFormat": "Bytes / Sec",
"datasource": {
"type": "loki",
"uid": "Loki"
}
}
],
"fieldConfig": {
"defaults": {
"unit": "Bps"
}
}
},
{
"id": 5,
"title": "APISIX Gateway Logs",
"type": "logs",
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 14
},
"targets": [
{
"expr": "{container=\"apisix-gateway\"}",
"datasource": {
"type": "loki",
"uid": "Loki"
}
}
],
"options": {
"showLabels": false,
"wrapLogMessage": true,
"enableLogDetails": true
}
}
],
"schemaVersion": 39,
"style": "dark",
"tags": ["apisix"],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "APISIX Gateway Performance",
"uid": "apisix-loki-perf",
"version": 1
}
@@ -0,0 +1,11 @@
apiVersion: 1
providers:
- name: 'APISIX Stack Dashboards'
orgId: 1
folder: 'APISIX API Gateway'
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/provisioning/dashboards
@@ -0,0 +1,10 @@
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
url: http://loki:3100
jsonData:
maxLines: 1000
isDefault: true