286 lines
6.8 KiB
JSON
286 lines
6.8 KiB
JSON
{
|
||
"annotations": {
|
||
"list": []
|
||
},
|
||
"description": "EtherPMS JVM 与 HTTP 概览(U8a 自动加载)",
|
||
"editable": true,
|
||
"fiscalYearStartMonth": 0,
|
||
"graphTooltip": 1,
|
||
"id": null,
|
||
"links": [],
|
||
"liveNow": false,
|
||
"panels": [
|
||
{
|
||
"title": "服务状态",
|
||
"type": "stat",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"h": 6,
|
||
"w": 24,
|
||
"x": 0,
|
||
"y": 0
|
||
},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"mappings": [
|
||
{
|
||
"options": {
|
||
"0": {
|
||
"text": "DOWN",
|
||
"color": "red"
|
||
},
|
||
"1": {
|
||
"text": "UP",
|
||
"color": "green"
|
||
}
|
||
},
|
||
"type": "value"
|
||
}
|
||
],
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{
|
||
"color": "red",
|
||
"value": null
|
||
},
|
||
{
|
||
"color": "green",
|
||
"value": 1
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"options": {
|
||
"reduceOptions": {
|
||
"values": false,
|
||
"calcs": ["lastNotNull"],
|
||
"fields": ""
|
||
},
|
||
"orientation": "horizontal",
|
||
"textMode": "auto",
|
||
"colorMode": "background",
|
||
"graphMode": "none",
|
||
"justifyMode": "center"
|
||
},
|
||
"targets": [
|
||
{
|
||
"expr": "up{job=~\"pms-.*\"}",
|
||
"legendFormat": "{{__name__}}",
|
||
"refId": "A"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"title": "JVM 堆内存使用率",
|
||
"type": "timeseries",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"h": 8,
|
||
"w": 12,
|
||
"x": 0,
|
||
"y": 6
|
||
},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "percentunit",
|
||
"min": 0,
|
||
"max": 1,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{ "color": "green", "value": null },
|
||
{ "color": "yellow", "value": 0.7 },
|
||
{ "color": "red", "value": 0.85 }
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"options": {
|
||
"legend": { "displayMode": "table", "placement": "bottom" },
|
||
"tooltip": { "mode": "multi", "sort": "none" }
|
||
},
|
||
"targets": [
|
||
{
|
||
"expr": "jvm_memory_used_bytes{area=\"heap\"} / jvm_memory_max_bytes{area=\"heap\"}",
|
||
"legendFormat": "{{application}}",
|
||
"refId": "A"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"title": "CPU 使用率",
|
||
"type": "timeseries",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"h": 8,
|
||
"w": 12,
|
||
"x": 12,
|
||
"y": 6
|
||
},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "percentunit",
|
||
"min": 0,
|
||
"max": 1,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{ "color": "green", "value": null },
|
||
{ "color": "yellow", "value": 0.7 },
|
||
{ "color": "red", "value": 0.85 }
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"options": {
|
||
"legend": { "displayMode": "table", "placement": "bottom" },
|
||
"tooltip": { "mode": "multi", "sort": "none" }
|
||
},
|
||
"targets": [
|
||
{
|
||
"expr": "process_cpu_usage",
|
||
"legendFormat": "{{application}}",
|
||
"refId": "A"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"title": "HTTP 请求速率(按状态码)",
|
||
"type": "timeseries",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"h": 8,
|
||
"w": 12,
|
||
"x": 0,
|
||
"y": 14
|
||
},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "reqps",
|
||
"custom": {
|
||
"drawStyle": "line",
|
||
"lineInterpolation": "smooth",
|
||
"fillOpacity": 20,
|
||
"stacking": { "mode": "normal", "group": "A" }
|
||
}
|
||
}
|
||
},
|
||
"options": {
|
||
"legend": { "displayMode": "table", "placement": "bottom" },
|
||
"tooltip": { "mode": "multi", "sort": "none" }
|
||
},
|
||
"targets": [
|
||
{
|
||
"expr": "sum(rate(http_server_requests_seconds_count[1m])) by (application, status)",
|
||
"legendFormat": "{{application}} {{status}}",
|
||
"refId": "A"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"title": "HTTP P95 响应时间",
|
||
"type": "timeseries",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"h": 8,
|
||
"w": 12,
|
||
"x": 12,
|
||
"y": 14
|
||
},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "s",
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{ "color": "green", "value": null },
|
||
{ "color": "yellow", "value": 1 },
|
||
{ "color": "red", "value": 2 }
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"options": {
|
||
"legend": { "displayMode": "table", "placement": "bottom" },
|
||
"tooltip": { "mode": "multi", "sort": "none" }
|
||
},
|
||
"targets": [
|
||
{
|
||
"expr": "histogram_quantile(0.95, sum(rate(http_server_requests_seconds_bucket[5m])) by (application, le))",
|
||
"legendFormat": "{{application}} P95",
|
||
"refId": "A"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"title": "HikariCP 连接池使用率",
|
||
"type": "timeseries",
|
||
"datasource": {
|
||
"type": "prometheus",
|
||
"uid": "prometheus"
|
||
},
|
||
"gridPos": {
|
||
"h": 8,
|
||
"w": 24,
|
||
"x": 0,
|
||
"y": 22
|
||
},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"unit": "percentunit",
|
||
"min": 0,
|
||
"max": 1,
|
||
"thresholds": {
|
||
"mode": "absolute",
|
||
"steps": [
|
||
{ "color": "green", "value": null },
|
||
{ "color": "yellow", "value": 0.7 },
|
||
{ "color": "red", "value": 0.85 }
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"options": {
|
||
"legend": { "displayMode": "table", "placement": "bottom" },
|
||
"tooltip": { "mode": "multi", "sort": "none" }
|
||
},
|
||
"targets": [
|
||
{
|
||
"expr": "hikaricp_connections_active / hikaricp_connections_maximum",
|
||
"legendFormat": "{{application}}",
|
||
"refId": "A"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"refresh": "30s",
|
||
"schemaVersion": 38,
|
||
"style": "dark",
|
||
"tags": ["etherpms", "jvm", "http"],
|
||
"templating": { "list": [] },
|
||
"time": { "from": "now-1h", "to": "now" },
|
||
"timepicker": {},
|
||
"timezone": "browser",
|
||
"title": "JVM 与 HTTP 概览",
|
||
"uid": "jvm-http-overview",
|
||
"version": 1,
|
||
"weekStart": ""
|
||
}
|