update metrics config

This commit is contained in:
BryantHe 2023-07-02 03:46:52 +08:00
parent 83c7804484
commit e0c0d372a2
2 changed files with 325 additions and 13 deletions

View File

@ -78,17 +78,17 @@
"steppedLine": false,
"targets": [
{
"expr": "hello",
"expr": "captcha_image",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"legendFormat": "hello {{quantile}}",
"legendFormat": "captcha_image {{quantile}}",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "Admin Service | Hello",
"title": "User Service | Captcha Image",
"tooltip": {
"shared": true,
"sort": 0,
@ -163,16 +163,268 @@
"steppedLine": false,
"targets": [
{
"expr": "error",
"expr": "login",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "error {{quantile}}",
"legendFormat": "login {{quantile}}",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "Admin Service | Error",
"title": "User Service | Login",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "5qrwjFCnk"
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 12,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 10,
"legend": {
"alignAsTable": true,
"avg": true,
"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": "8.5.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "get_info",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "get_info {{quantile}}",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "User Service | Get Info",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "5qrwjFCnk"
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 12,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 10,
"legend": {
"alignAsTable": true,
"avg": true,
"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": "8.5.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "get_profile",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "get_profile {{quantile}}",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "User Service | Get Profile",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "5qrwjFCnk"
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 12,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 10,
"legend": {
"alignAsTable": true,
"avg": true,
"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": "8.5.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "tenants",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "tenants {{quantile}}",
"refId": "A"
}
],
"thresholds": [],
"timeRegions": [],
"title": "Permission Service | Tenants",
"tooltip": {
"shared": true,
"sort": 0,
@ -201,7 +453,7 @@
}
}
],
"refresh": "10s",
"refresh": "5s",
"schemaVersion": 36,
"style": "dark",
"tags": [],

View File

@ -1,11 +1,11 @@
mappings:
- match: "admin-service.admin-service.hello"
- match: "user-service.user-service.captcha_image"
observer_type: summary
name: "hello"
name: "captcha_image"
labels:
provider: "$2"
outcome: "$3"
job: "admin-service"
job: "user-service"
summary_options:
quantiles:
- quantile: 0.99
@ -19,13 +19,73 @@ mappings:
max_summary_age: 30s
summary_age_buckets: 3
stream_buffer_size: 1000
- match: "admin-service.admin-service.error"
- match: "user-service.user-service.login"
observer_type: summary
name: "error"
name: "login"
labels:
provider: "$2"
outcome: "$3"
job: "admin-service"
job: "user-service"
summary_options:
quantiles:
- quantile: 0.99
error: 0.001
- quantile: 0.95
error: 0.01
- quantile: 0.9
error: 0.05
- quantile: 0.5
error: 0.005
max_summary_age: 30s
summary_age_buckets: 3
stream_buffer_size: 1000
- match: "user-service.user-service.get_info"
observer_type: summary
name: "get_info"
labels:
provider: "$2"
outcome: "$3"
job: "user-service"
summary_options:
quantiles:
- quantile: 0.99
error: 0.001
- quantile: 0.95
error: 0.01
- quantile: 0.9
error: 0.05
- quantile: 0.5
error: 0.005
max_summary_age: 30s
summary_age_buckets: 3
stream_buffer_size: 1000
- match: "user-service.user-service.get_profile"
observer_type: summary
name: "get_profile"
labels:
provider: "$2"
outcome: "$3"
job: "user-service"
summary_options:
quantiles:
- quantile: 0.99
error: 0.001
- quantile: 0.95
error: 0.01
- quantile: 0.9
error: 0.05
- quantile: 0.5
error: 0.005
max_summary_age: 30s
summary_age_buckets: 3
stream_buffer_size: 1000
- match: "permission-service.permission-service.tenants"
observer_type: summary
name: "tenants"
labels:
provider: "$2"
outcome: "$3"
job: "permission-service"
summary_options:
quantiles:
- quantile: 0.99