linux离线部署Grafana
1.下载和解压缩Grafana
从https://grafana.com/grafana/download/下载适合您系统的Grafana压缩包。将下载的文件解压缩到您选择的目录中。
2.启动Grafana
./bin/grafana-server
3.访问Grafana Web界面
打开浏览器,访问http://localhost:3000。默认账号密码是admin/admin,登录成功改密码,改成功进入Grafana Web界面。您可以使用这个界面来创建、配置和查询仪表盘和图表。
4.新增Prometeus数据源
填写Prometheus的ip
5.常用jmx_javaagent的面板json模板
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "JMX exporter dashboard for metrics exported by Prometheus Operator",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 8878,
"graphTooltip": 0,
"id": 8,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"text": "DOWN"
},
"1": {
"text": "UP"
}
},
"type": "value"
},
{
"options": {
"match": "null",
"result": {
"text": "DOWN"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d44a3a"
},
{
"color": "#e24d42",
"value": 0
},
{
"color": "#299c46",
"value": 1
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 3,
"y": 0
},
"hideTimeOverride": false,
"id": 21,
"links": [
{
"targetBlank": true,
"title": "Tomcat dashboard (for Prometheus Operator)",
"url": "/d/chanjarster-tomcat-dashboard-prom-op/tomcat-dashboard-for-prometheus-operator?$__url_time_range&$__all_variables"
},
{
"targetBlank": true,
"title": "K8s / Compute Resources / Pod",
"url": "dashboard/db/k8s-compute-resources-pod?$__url_time_range&$__all_variables"
}
],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "up{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "Status",
"type": "stat"
},
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 4,
"x": 6,
"y": 0
},
"id": 14,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "time() - process_start_time_seconds{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "Uptime",
"type": "stat"
},
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#299c46"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 35
},
{
"color": "#d44a3a",
"value": 50
}
]
},
"unit": "dateTimeAsIso"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 4,
"x": 10,
"y": 0
},
"id": 15,
"interval": "",
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "process_start_time_seconds{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}*1000",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "Start time",
"type": "stat"
},
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 7,
"x": 14,
"y": 0
},
"id": 19,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^jdk$/",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "label_join(jvm_info{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}, \"jdk\", \", \", \"vendor\", \"runtime\", \"version\")",
"format": "table",
"instant": true,
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"title": "JVM Version",
"type": "stat"
},
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 4,
"x": 6,
"y": 4
},
"id": 39,
"interval": "",
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "os_available_processors{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "Available CPUs",
"type": "stat"
},
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 1,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#299c46"
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 0.5
},
{
"color": "#d44a3a",
"value": 0.8
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 4,
"x": 10,
"y": 4
},
"id": 23,
"links": [],
"maxDataPoints": 100,
"options": {
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "os_process_cpu_load{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "Process cpu load",
"type": "gauge"
},
{
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 4,
"x": 14,
"y": 4
},
"id": 38,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.5.1",
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "os_open_file_descriptor_count{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"refId": "A"
}
],
"title": "Open file descriptors",
"type": "stat"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"decimals": 1,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 8
},
"hiddenSeries": false,
"id": 29,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"editorMode": "code",
"expr": "os_process_cpu_load{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "CPU load",
"range": true,
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "CPU load",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"decimals": 1,
"format": "percentunit",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"uid": "$datasource"
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 17
},
"hiddenSeries": false,
"id": 8,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"maxPerRow": 4,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": "memarea",
"repeatDirection": "h",
"seriesOverrides": [
{
"alias": "Usage %",
"bars": true,
"color": "#6d1f62",
"legend": false,
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_memory_bytes_used{area=\"$memarea\",namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Used",
"refId": "A"
},
{
"datasource": {
"uid": "$datasource"
},
"expr": " jvm_memory_bytes_max{area=\"$memarea\",namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Upper limit",
"refId": "B"
},
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_memory_bytes_used{area=\"$memarea\",namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"} / jvm_memory_bytes_max >= 0",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"legendFormat": "Usage %",
"refId": "C"
}
],
"thresholds": [],
"timeRegions": [],
"title": "Memory area [$memarea]",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"logBase": 1,
"show": true
},
{
"format": "percentunit",
"label": "Usage %",
"logBase": 1,
"max": "1",
"min": "0",
"show": true
}
],
"yaxis": {
"align": true,
"alignLevel": 0
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"uid": "$datasource"
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 35
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"maxPerRow": 2,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": "mempool",
"repeatDirection": "h",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_memory_pool_bytes_max{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\",pool=\"$mempool\"}",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "Max ",
"metric": "jvm_memory_bytes_used",
"refId": "B",
"step": 5
},
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_memory_pool_bytes_used{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\",pool=\"$mempool\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Used",
"metric": "jvm_memory_bytes_used",
"refId": "A",
"step": 5
},
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_memory_pool_bytes_committed{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\",pool=\"$mempool\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Committed",
"metric": "jvm_memory_bytes_used",
"refId": "C",
"step": 5
}
],
"thresholds": [],
"timeRegions": [],
"title": "Memory pool [$mempool]",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"uid": "$datasource"
},
"decimals": 0,
"fill": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 83
},
"id": 5,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "increase(jvm_gc_collection_seconds_sum{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}[$__interval])",
"format": "time_series",
"interval": "60s",
"intervalFactor": 1,
"legendFormat": "{{gc}}",
"metric": "jvm_gc_collection_seconds_sum",
"refId": "A",
"step": 10
}
],
"thresholds": [],
"title": "GC time increase",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "s",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"uid": "$datasource"
},
"decimals": 0,
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 83
},
"hiddenSeries": false,
"id": 6,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "increase(jvm_gc_collection_seconds_count{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}[$__interval])",
"format": "time_series",
"interval": "60s",
"intervalFactor": 1,
"legendFormat": "{{gc}}",
"metric": "",
"refId": "A",
"step": 10
}
],
"thresholds": [],
"timeRegions": [],
"title": "GC count increase",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"decimals": 0,
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"uid": "$datasource"
},
"decimals": 0,
"fill": 1,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 91
},
"id": 3,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideZero": true,
"max": true,
"min": false,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_threads_current{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "JVM current threads",
"metric": "jvm_threads_current",
"refId": "A",
"step": 10
},
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_threads_daemon{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "JVM daemon threads",
"metric": "jvm_threads_daemon",
"refId": "B",
"step": 10
},
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_threads_deadlocked{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "JVM deadlocked threads",
"refId": "C"
}
],
"thresholds": [],
"title": "Threads used",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"decimals": 0,
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"uid": "$datasource"
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 91
},
"hiddenSeries": false,
"id": 4,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"datasource": {
"uid": "$datasource"
},
"expr": "jvm_classes_loaded{namespace=\"$namespace\",service=\"$service\",pod=\"$pod\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "loaded ",
"metric": "jvm_classes_loaded",
"refId": "A",
"step": 10
}
],
"thresholds": [],
"timeRegions": [],
"title": "Class loading",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"decimals": 0,
"format": "short",
"label": "",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": false
}
],
"yaxis": {
"align": false
}
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"tags": [
"JVM"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "Prometheus"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": {
"uid": "$datasource"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "",
"multi": false,
"name": "namespace",
"options": [],
"query": "label_values(jvm_info, namespace)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": ".*",
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": {
"uid": "$datasource"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "",
"multi": false,
"name": "service",
"options": [],
"query": "label_values(jvm_info{namespace=\"$namespace\"}, service)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": ".*",
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": {
"uid": "$datasource"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "pod",
"multi": false,
"name": "pod",
"options": [],
"query": "label_values(jvm_info{namespace=\"$namespace\", service=\"$service\"}, pod)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": "",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"uid": "$datasource"
},
"definition": "",
"hide": 2,
"includeAll": true,
"label": "mem pool",
"multi": true,
"name": "mempool",
"options": [],
"query": "label_values(jvm_memory_pool_bytes_max{namespace=\"$namespace\", service=\"$service\", pod=\"$pod\"}, pool)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": "",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"uid": "$datasource"
},
"definition": "",
"hide": 2,
"includeAll": true,
"label": "mem area",
"multi": true,
"name": "memarea",
"options": [],
"query": "label_values(jvm_memory_bytes_used{namespace=\"$namespace\", service=\"$service\", pod=\"$pod\"}, area)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-15m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "JVM dashboard (for Prometheus Operator)",
"uid": "chanjarster-jvm-dashboard-prom-op",
"version": 4,
"weekStart": ""
}
标签:false,service,namespace,离线,Grafana,---,datasource,pod,true
From: https://www.cnblogs.com/hujunwei/p/17379453.html