Loading... # 一、目标 1. 搭建夜莺6.5.0系统 2. 部署categraf采集脚本实现云主机数据上报 3. 增加监控分类,包括linux云主机、redis、mysql、mongodb、opentsdb等 4. 增加告警配置 # 二、搭建夜莺6.5.0系统 准备1台云主机,2C4G50GB 做好系统参数优化 登录服务器192.168.124.145 ``` cd /opt/ mkdir n9e cd n9e wget https://download.flashcat.cloud/n9e-v6.5.0-linux-amd64.tar.gz tar xzvf n9e-v6.5.0-linux-amd64.tar.gz cd docker cd compose-bridge docker-compose up -d ``` 然后记得删除/opt/n9e/initsql文件夹 ``` rm -rvf /opt/n9e/initsql ``` # 三、部署categraf采集脚本实现云主机数据上报 ``` mkdir -p /opt/categraf cd /opt/categraf wget https://download.flashcat.cloud/categraf-v0.3.39-linux-amd64.tar.gz tar xzvf categraf-v0.3.39-linux-amd64.tar.gz ``` ``` cat <<'EOF'> /opt/categraf/conf/config.toml [global] # whetherr print configs print_configs = false # add label(agent_hostname) to series # "" -> auto detect hostname # "xx" -> use specified string xx # "$hostname" -> auto detect hostname # "$ip" -> auto detect ip # "$hostname-$ip" -> auto detect hostname and ip to replace the vars hostname = "$hostname-$ip" # will not add label(agent_hostname) if true omit_hostname = false # s | ms precision = "ms" # global collect interval interval = 15 # input provider settings; optional: local / http providers = ["local"] disable_usage_report = true # [global.labels] # region = "shanghai" # env = "localhost" [writer_opt] batch = 1000 chan_size = 1000000 [[writers]] url = "http://192.168.124.145:17000/prometheus/v1/write" # Basic auth username basic_auth_user = "" # Basic auth password basic_auth_pass = "" ## Optional headers # headers = ["X-From", "categraf", "X-Xyz", "abc"] # timeout settings, unit: ms timeout = 5000 dial_timeout = 2500 max_idle_conns_per_host = 100 [http] enable = false address = ":9100" print_access = false run_mode = "release" [ibex] enable = false ## ibex flush interval interval = "1000ms" ## n9e ibex server rpc address Servers = ["192.168.124.145:20090"] ## temp script dir metaDir = "./meta" [http_provider] # HttpRemoteProvider插件,通过Http请求的方式获取Categraf的配置 # 通过设置global中的provider为HttpRemoteProvider启用 # example request: GET /categraf/configs?agent=categraf&host=machine1 HTTP/1.1 # struct of response # type httpRemoteProviderResponse struct { # // version is signature/md5 of current Config, server side should deal with the Version calculate # Version string `json:"version"` # # // ConfigMap (InputName -> Config), if version is identical, server side can set Config to nil # Configs map[string]cfg.ConfigWithFormat `json:"configs"` # } # type ConfigWithFormat struct { # Config string `json:"config"` # Format ConfigFormat `json:"format"` # } # example response: # { # "version": "111", # "configs": { # "mysql": { # "config": "# # collect interval\n# interval = 15\n\n[[ instances ]]\naddress = \"172.33.44.55:3306\"\nusername = \"111\"\npassword = \"2222\"\nlabels = { instance = \"mysql2\"}\nextra_innodb_metrics =true", # "format": "toml" # } # } #} # # remote url remote_url = "http://localhost:20000/categraf/configs" # header settings when request config from remote # headers = ["X-From", "categraf", "X-Xyz", "abc"] # http basic auth config # basic_auth_user = "" # basic_auth_pass = "" # http timeout in seconds timeout = 5 # reload interval in seconds reload_interval = 120 ## Optional TLS Config # use_tls = false # tls_ca = "/etc/categraf/ca.pem" # tls_cert = "/etc/categraf/cert.pem" # tls_key = "/etc/categraf/key.pem" ## Use TLS but skip chain & host verification # insecure_skip_verify = false # [heartbeat] enable = true # report os version cpu.util mem.util metadata url = "http://192.168.124.145:17000/v1/n9e/heartbeat" # interval, unit: s interval = 10 # Basic auth username basic_auth_user = "" # Basic auth password basic_auth_pass = "" ## Optional headers # headers = ["X-From", "categraf", "X-Xyz", "abc"] # timeout settings, unit: ms timeout = 5000 dial_timeout = 2500 max_idle_conns_per_host = 100 EOF ``` ![2023-11-29T02:46:45.png][1] 打标签 ![2023-11-29T02:50:29.png][2] ![2023-11-29T03:05:15.png][3] 修改主机名 ![2023-11-29T03:14:07.png][4] ![2023-11-29T03:14:12.png][5] ![2023-11-29T03:13:50.png][6] 修改后,注意categraf上报的数据会有相应变化,需要重新打标签了。 # 四、增加监控分类,包括linux云主机、redis、mysql、mongodb、opentsdb等 ## 云主机仪表盘 ``` { "name": "云主机", "tags": "", "ident": "", "configs": { "links": [ { "targetBlank": true, "title": "n9e", "url": "https://n9e.github.io/" }, { "targetBlank": true, "title": "author", "url": "http://flashcat.cloud/" } ], "panels": [ { "collapsed": true, "id": "2b2de3d1-65c8-4c39-9bea-02b754e0d751", "layout": { "h": 1, "w": 24, "x": 0, "y": 0, "i": "2b2de3d1-65c8-4c39-9bea-02b754e0d751", "isResizable": false }, "name": "单机概况", "type": "row", "panels": [] }, { "type": "barGauge", "id": "deec579b-3090-4344-a9a6-c1455c4a8e50", "layout": { "h": 3, "w": 6, "x": 0, "y": 1, "i": "deec579b-3090-4344-a9a6-c1455c4a8e50", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "system_uptime{project=~\"$project\",service=~\"$service\",endname=~\"$endname\"}/3600/24", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}-uptime" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "启动时长(单位:天)", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "7a7bd5db-d12e-49f0-92a8-15958e99ee54", "layout": { "h": 3, "w": 6, "x": 6, "y": 1, "i": "7a7bd5db-d12e-49f0-92a8-15958e99ee54", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "100-cpu_usage_idle{project=~\"$project\", service=~\"$service\", endname=~\"$endname\", cpu=\"cpu-total\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "8a814265-54ad-419c-8cb7-e1f84a242de0", "layout": { "h": 3, "w": 6, "x": 12, "y": 1, "i": "8a814265-54ad-419c-8cb7-e1f84a242de0", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_used_percent{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内存使用率", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "d7d11972-5c5b-4bc6-98f8-bbbe9f018896", "layout": { "h": 3, "w": 3, "x": 18, "y": 1, "i": "d7d11972-5c5b-4bc6-98f8-bbbe9f018896", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "linux_sysctl_fs_file_nr{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}/linux_sysctl_fs_file_max{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}*100", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "FD使用率", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "209d3aba-5e02-4b8f-a364-65f20ba92a2c", "layout": { "h": 3, "w": 3, "x": 21, "y": 1, "i": "209d3aba-5e02-4b8f-a364-65f20ba92a2c", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_swap_total{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}-mem_swap_free{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "SWAP使用", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "b3c5dd9d-e82a-4b15-8b23-c510e2bee152", "layout": { "h": 3, "w": 8, "x": 0, "y": 4, "i": "b3c5dd9d-e82a-4b15-8b23-c510e2bee152", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_used_percent{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "instant": false, "legend": "{{project}}-{{service}}-{{endname}}-{{path}}", "refId": "A", "step": 60 } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "磁盘使用率", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "0de74cd9-cc74-4a96-bcb2-05d3a8bde2ea", "layout": { "h": 3, "w": 8, "x": 8, "y": 4, "i": "0de74cd9-cc74-4a96-bcb2-05d3a8bde2ea", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_inodes_used{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}/disk_inodes_total{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "instant": true, "legend": "{{project}}-{{service}}-{{endname}}-{{path}}", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "inode使用率", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "timeseries", "id": "59afa167-434d-496c-a3ef-ceff6db7c1f6", "layout": { "h": 3, "w": 8, "x": 16, "y": 4, "i": "59afa167-434d-496c-a3ef-ceff6db7c1f6", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(diskio_io_time{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])/10", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "io_util", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "decimals": 1 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "aabb8263-1a9b-43fb-bee1-6c532f5012a3", "layout": { "h": 1, "w": 24, "x": 0, "y": 7, "i": "aabb8263-1a9b-43fb-bee1-6c532f5012a3", "isResizable": false }, "name": "系统指标", "type": "row", "panels": [] }, { "type": "timeseries", "id": "1b4da538-29d4-4c58-b3f4-773fabb8616c", "layout": { "h": 4, "w": 8, "x": 0, "y": 8, "i": "1b4da538-29d4-4c58-b3f4-773fabb8616c", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "processes_total{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "进程总数", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" }, { "color": "#fa2a05", "value": 2000 } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "aa7adae0-ae3b-4e28-a8ce-801c65961552", "layout": { "h": 4, "w": 8, "x": 8, "y": 8, "i": "aa7adae0-ae3b-4e28-a8ce-801c65961552", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(kernel_context_switches{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-context_switches", "refId": "A" }, { "expr": "rate(kernel_interrupts{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-kernel_interrupts", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "上下文切换/中断", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "71e22f58-5b9a-4604-bca8-55bcef59b5fe", "layout": { "h": 4, "w": 8, "x": 16, "y": 8, "i": "71e22f58-5b9a-4604-bca8-55bcef59b5fe", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "kernel_entropy_avail{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "legend": "{{project}}-{{service}}-{{endname}}-entropy_avail", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "熵池大小", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" }, { "color": "#f50505", "value": 100 } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "10f34f8f-f94d-4a28-9551-16e6667e3833", "layout": { "h": 1, "w": 24, "x": 0, "y": 12, "i": "10f34f8f-f94d-4a28-9551-16e6667e3833", "isResizable": false }, "name": "CPU", "type": "row", "panels": [] }, { "type": "timeseries", "id": "043c26de-d19f-4fe8-a615-2b7c10ceb828", "layout": { "h": 4, "w": 8, "x": 0, "y": 13, "i": "043c26de-d19f-4fe8-a615-2b7c10ceb828", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_guest{project=~\"$project\", service=~\"$service\",endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_guest", "refId": "A", "instant": false } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_guest", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "1559d880-7e26-4e42-9427-4e55fb6f67be", "layout": { "h": 4, "w": 8, "x": 8, "y": 13, "i": "1559d880-7e26-4e42-9427-4e55fb6f67be", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_idle{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU空闲率", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" }, { "color": "#f20202", "value": 10 } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "a420ce25-6968-47f8-8335-60cde70fd062", "layout": { "h": 4, "w": 8, "x": 16, "y": 13, "i": "a420ce25-6968-47f8-8335-60cde70fd062", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "system_load1{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "B", "legend": "{{project}}-{{service}}-{{endname}}-load1" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU负载(1分钟)", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "59f30e00-2db5-4d20-91d2-218d81c40ba8", "layout": { "h": 4, "w": 8, "x": 0, "y": 17, "i": "894bba23-cb82-4a58-b461-411b05899155", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_iowait{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_iowait", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_iowait", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "ae712126-2227-4341-941c-151638884734", "layout": { "h": 4, "w": 8, "x": 8, "y": 17, "i": "3c151a5a-f6b3-4a2b-9428-2b03465016ae", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_user{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_user", "refId": "C" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_user", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "3ea75acc-e8df-4df8-b04c-ac615daef565", "layout": { "h": 4, "w": 8, "x": 16, "y": 17, "i": "d6013ac3-76ba-4e97-bffb-56dab0a1bd13", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "system_load5{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}-load5" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU负载(5分钟)", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "9444aac9-8bcc-435a-8d11-d7765be729d2", "layout": { "h": 4, "w": 8, "x": 0, "y": 21, "i": "5ff83164-2616-491a-aba6-8b5cba317b33", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_system{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_system", "refId": "D" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_system", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "280c2b1e-34c6-45c6-a399-6a8c7f58092e", "layout": { "h": 4, "w": 8, "x": 8, "y": 21, "i": "24fe3080-f627-4a5e-92d8-d0f35f460f81", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_irq{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_irq", "refId": "E" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_irq", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "ecb55bc3-d065-4151-bec8-1a2485b40248", "layout": { "h": 4, "w": 8, "x": 16, "y": 21, "i": "b5ce1efd-8ab3-47b9-a637-98021e31dac3", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "system_load15{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}-load15" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU负载(15分钟)", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "18a8c25a-a54a-4365-bafd-49aaec1a9f2a", "layout": { "h": 4, "w": 8, "x": 0, "y": 25, "i": "16a82fb1-dd81-4d1e-b802-fc5693c9aec3", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_softirq{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_softirq", "refId": "F" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_softirq", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "92cce2c9-9e22-431a-9ce6-ecac64f1ac23", "layout": { "h": 4, "w": 8, "x": 8, "y": 25, "i": "417c335f-aa6d-470c-ab74-368eeca535e6", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_nice{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_nice", "refId": "G" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_nice", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "fee9f9a0-75ce-44f0-84b0-a6eda9d4d326", "layout": { "h": 4, "w": 8, "x": 16, "y": 25, "i": "331a355a-9d22-4273-8e28-24d701845649", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "cpu_usage_steal{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",cpu=\"cpu-total\"}*100", "legend": "{{project}}-{{service}}-{{endname}}-cpu_usage_steal", "refId": "H" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CPU使用率详情 cpu_usage_steal", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "b7a3c99f-a796-4b76-89b5-cbddd566f91c", "layout": { "h": 1, "w": 24, "x": 0, "y": 29, "i": "b7a3c99f-a796-4b76-89b5-cbddd566f91c", "isResizable": false }, "name": "内存详情", "type": "row", "panels": [] }, { "type": "timeseries", "id": "239aacdf-1982-428b-b240-57f4ce7f946d", "layout": { "h": 4, "w": 8, "x": 0, "y": 30, "i": "239aacdf-1982-428b-b240-57f4ce7f946d", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_active{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态内存使用 mem_active", "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "e125e256-1a0e-430e-9e59-b28a2de886f6", "layout": { "h": 4, "w": 8, "x": 8, "y": 30, "i": "9942ce5e-aead-47a6-aa4d-482ec2fa9bdd", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_cached{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "B", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态内存使用 mem_cached", "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "015de2cb-0b89-47f7-9dae-53faa95b0697", "layout": { "h": 4, "w": 8, "x": 16, "y": 30, "i": "2523e8b2-c6e1-48c8-8822-56705d9e10bf", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_buffered{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态内存使用 mem_buffered", "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "2476d0a7-b59e-448d-95d9-061d532b9a70", "layout": { "h": 4, "w": 8, "x": 0, "y": 34, "i": "a54737f0-1364-48f9-8d18-4f3a06eb7ed4", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_mapped{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "E", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态内存使用 mem_mapped", "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "5652ef4e-2fd9-495c-a506-878f44715220", "layout": { "h": 4, "w": 8, "x": 8, "y": 34, "i": "f37487a5-6697-43d9-85ac-9837572f2020", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_inactive{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "D", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态内存使用 mem_inactive", "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "e516600d-ebc9-4b36-93a7-c9598b77afcf", "layout": { "h": 4, "w": 8, "x": 16, "y": 34, "i": "3578a256-be81-4ab6-a389-70f55ee12eb2", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_shared{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "F", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态内存使用 mem_shared", "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "00ed6e4d-c979-4938-a20e-56d42ca452cf", "layout": { "h": 4, "w": 8, "x": 0, "y": 38, "i": "00ed6e4d-c979-4938-a20e-56d42ca452cf", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_slab{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内核态内存使用 mem_slab", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "cf3def32-373d-4a8a-801d-135b425ac03f", "layout": { "h": 4, "w": 8, "x": 8, "y": 38, "i": "7f0c0262-183a-49c9-a7d4-650e1bc07e2b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_sreclaimable{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "B", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内核态内存使用 mem_sreclaimable", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "bb5248ae-4c91-4f40-99d0-17a6baec4c9a", "layout": { "h": 4, "w": 8, "x": 16, "y": 38, "i": "e74c7fac-e34a-43cd-8c6d-e7140e121347", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_sunreclaim{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内核态内存使用 mem_sunreclaim", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "c85f2e3c-b4e7-49d4-9030-529e74f80df1", "layout": { "h": 4, "w": 8, "x": 0, "y": 42, "i": "c16b878c-9e65-4afe-8983-f525c19b1a91", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_vmalloc_used{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "D", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内核态内存使用 mem_vmalloc_used", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "e7a5bf53-6cb8-4a53-bc1a-0b85eed5e6b6", "layout": { "h": 4, "w": 8, "x": 8, "y": 42, "i": "2043f9fd-79a9-456e-b2ac-1290d2717080", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mem_vmalloc_chunk{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "E", "legend": "{{project}}-{{service}}-{{endname}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内核态内存使用 mem_vmalloc_chunk", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "842a8c48-0e93-40bf-8f28-1b2f837e5c19", "layout": { "h": 1, "w": 24, "x": 0, "y": 46, "i": "842a8c48-0e93-40bf-8f28-1b2f837e5c19", "isResizable": false }, "name": "磁盘详情", "type": "row", "panels": [] }, { "type": "barGauge", "id": "bc894871-1c03-4d12-91be-6867f394a8a6", "layout": { "h": 6, "w": 8, "x": 0, "y": 47, "i": "bc894871-1c03-4d12-91be-6867f394a8a6", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_free{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}-{{device}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "磁盘空间 disk_free", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "asc" }, "options": { "standardOptions": {} } }, { "type": "timeseries", "id": "d825671f-7dc5-46a2-89dc-4fff084a3ae0", "layout": { "h": 4, "w": 8, "x": 8, "y": 47, "i": "d825671f-7dc5-46a2-89dc-4fff084a3ae0", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "linux_sysctl_fs_file_max{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}-linux_sysctl_fs_file_max" }, { "expr": "linux_sysctl_fs_file_nr{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "B", "legend": "{{project}}-{{service}}-{{endname}}_linux_sysctl_fs_file_nr" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "fd使用", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d27b522f-9c70-42f2-9e31-fed3816fd675", "layout": { "h": 4, "w": 8, "x": 16, "y": 47, "i": "d27b522f-9c70-42f2-9e31-fed3816fd675", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_inodes_total{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",path!~\"/var.*\"}", "legend": "{{project}}-{{service}}-{{endname}}-{{device}}-disk_inodes_total", "refId": "A" }, { "expr": "disk_inodes_used{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",path!~\"/var.*\"}", "legend": "{{project}}-{{service}}-{{endname}}-{{device}}-disk_inodes_used", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "inode", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "bbd1ebda-99f6-419c-90a5-5f84973976dd", "layout": { "h": 4, "w": 8, "x": 8, "y": 51, "i": "bbd1ebda-99f6-419c-90a5-5f84973976dd", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(diskio_read_bytes{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-read", "refId": "A" }, { "expr": "rate(diskio_write_bytes{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-writes", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "IO吞吐量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d6b45598-54c6-4b36-a896-0a7529ac21f8", "layout": { "h": 4, "w": 8, "x": 16, "y": 51, "i": "d6b45598-54c6-4b36-a896-0a7529ac21f8", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(diskio_write_time{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-write_time", "refId": "A", "instant": false }, { "expr": "rate(diskio_writes{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "refId": "B", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-writes" }, { "expr": "rate(diskio_read_time{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-read_time" }, { "expr": "rate(diskio_reads{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "refId": "D", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-reads" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "iowait", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "min": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" }, "lineInterpolation": "linear" } }, { "type": "barGauge", "id": "03610e08-078d-4fd6-bde3-5dc754be0157", "layout": { "h": 6, "w": 8, "x": 0, "y": 53, "i": "201a3997-d509-4524-ad76-3a26b0340980", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_total{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}-{{device}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "磁盘空间 disk_total", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "timeseries", "id": "f645741e-c632-4685-b267-c7ad26b5c10e", "layout": { "h": 4, "w": 8, "x": 8, "y": 55, "i": "f645741e-c632-4685-b267-c7ad26b5c10e", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(diskio_reads{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-read", "refId": "A" }, { "expr": "rate(diskio_writes{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{name}}-writes", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "IOPS", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d4b1267d-b7cb-4c65-adaf-1723d807eb9f", "layout": { "h": 4, "w": 8, "x": 0, "y": 59, "i": "33d4320e-dbee-4641-937c-fd52eb9cc449", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_used{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}-{{device}}-disk_used" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "磁盘空间 disk_used", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC", "min": 0, "decimals": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "cf81f399-f0e3-49bb-b72b-e04c6cb09c75", "layout": { "h": 4, "w": 8, "x": 8, "y": 59, "i": "b4874b02-8862-4f84-8e58-89612ccc0dd7", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "disk_used_percent{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}-{{device}}-disk_used" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "磁盘空间使用百分比", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "min": 0, "decimals": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "307152d2-708c-4736-98cf-08b886cbf7f2", "layout": { "h": 1, "w": 24, "x": 0, "y": 63, "i": "307152d2-708c-4736-98cf-08b886cbf7f2", "isResizable": false }, "name": "网络详情", "type": "row" }, { "type": "timeseries", "id": "f2ee5d32-737c-4095-b6b7-b15b778ffdb9", "layout": { "h": 4, "w": 6, "x": 0, "y": 64, "i": "f2ee5d32-737c-4095-b6b7-b15b778ffdb9", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(net_bytes_recv{project=~\"$project\", service=~\"$service\", endname=~\"$endname\", interface =~ \"eth0|ens192\" }[1m])*8", "legend": "{{project}}-{{service}}-{{endname}}-recv", "refId": "A", "instant": false }, { "expr": "rate(net_bytes_sent{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",interface =~ \"eth0|ens192\" }[1m])*8", "legend": "{{project}}-{{service}}-{{endname}}-sent", "refId": "B", "instant": false } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "网络流量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bitsIEC", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "9113323a-98f5-4bff-a8ce-3b459e7e2190", "layout": { "h": 4, "w": 6, "x": 6, "y": 64, "i": "9113323a-98f5-4bff-a8ce-3b459e7e2190", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(net_packets_recv{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",interface =~ \"eth0|ens192\" }[1m])", "legend": "{{project}}-{{service}}-{{endname}}-recv", "refId": "A" }, { "expr": "rate(net_packets_sent{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",interface =~ \"eth0|ens192\" }[1m])", "legend": "{{project}}-{{service}}-{{endname}}-sent", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "packets", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "05c68ccb-713f-4ccc-b594-82272d2446d5", "layout": { "h": 4, "w": 6, "x": 12, "y": 64, "i": "298f5998-b4c5-4806-85f3-e82f87b66123", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(net_err_in{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",interface =~ \"eth0|ens192\" }[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{interface}}-in", "refId": "A" }, { "expr": "rate(net_err_out{project=~\"$project\", service=~\"$service\", endname=~\"$endname\",interface =~ \"eth0|ens192\" }[1m])", "legend": "{{project}}-{{service}}-{{endname}}-{{interface}}-out", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "error", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "4123f4c1-bf8e-400e-b267-8d7f6a92691a", "layout": { "h": 4, "w": 6, "x": 18, "y": 64, "i": "4123f4c1-bf8e-400e-b267-8d7f6a92691a", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(net_drop_in{project=~\"$project\", service=~\"$service\", endname=~\"$endname\" }[30s])", "legend": "{{project}}-{{service}}-{{endname}}-{{interface}}-in", "refId": "A" }, { "expr": "increase(net_drop_out{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[30s])", "legend": "{{project}}-{{service}}-{{endname}}-{{interface}}-out", "refId": "B" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "drop", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "bars", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "cfb80689-de7b-47fb-9155-052b796dd7f5", "layout": { "h": 4, "w": 24, "x": 0, "y": 68, "i": "cfb80689-de7b-47fb-9155-052b796dd7f5", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "netstat_tcp_established{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "refId": "A", "legend": "{{project}}-{{service}}-{{endname}}-netstat_tcp_established" }, { "expr": "netstat_tcp_listen{project=~\"$project\",service=~\"$service\", endname=~\"$endname\" }", "refId": "B", "legend": "{{project}}-{{service}}-{{endname}}-netstat_tcp_listen" }, { "expr": "netstat_tcp_time_wait{project=~\"$project\",service=~\"$service\", endname=~\"$endname\" }", "refId": "C", "legend": "{{project}}-{{service}}-{{endname}}-netstat_tcp_time_wait" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "tcp", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "row", "id": "ecb14b2c-50f1-4c3f-af74-e7b4311be26a", "name": "TCP状态", "collapsed": false, "layout": { "h": 1, "w": 24, "x": 0, "y": 72, "i": "ecb14b2c-50f1-4c3f-af74-e7b4311be26a", "isResizable": false } }, { "type": "timeseries", "id": "07ac902a-bd74-4529-81c5-e9ee86963700", "layout": { "h": 4, "w": 6, "x": 0, "y": 73, "i": "e5063a14-3d18-458d-a765-ba39d4f6249b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(tcp_counter_from_snmp_RtoAlgorithm{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-RtoAlgorithm", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "RtoAlgorithm", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "41bbf233-760f-4802-89cc-f322be138d96", "layout": { "h": 4, "w": 6, "x": 6, "y": 73, "i": "ac2378c3-63a2-4173-91b3-1e6154f226e5", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(tcp_counter_from_snmp_RtoAlgorithm{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-RtoMin", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "RtoMin", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "1372f8e7-db55-4d4c-a139-85582bb65661", "layout": { "h": 4, "w": 6, "x": 12, "y": 73, "i": "1b254eb4-aa71-4dc6-b6c5-d1bf87514c05", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(tcp_counter_from_snmp_RtoMax{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-RtoMax", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "RtoMax", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "6b809752-2cdd-4f96-9fd7-829c1176e3fa", "layout": { "h": 4, "w": 6, "x": 18, "y": 73, "i": "c95fe9fe-7508-4464-b038-817636721ac1", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(tcp_counter_from_snmp_MaxConn{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-MaxConn", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MaxConn", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "f4d1a774-991d-4b89-94e3-dfeb36462eef", "layout": { "h": 4, "w": 6, "x": 0, "y": 77, "i": "72d26b90-eec6-4db6-b0ac-f81a080b8822", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_ActiveOpens{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-ActiveOpens", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "ActiveOpens", "description": "一分钟内新增主动连接请求的数量。", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d93f609d-d39f-460b-b376-6aba5b9d4b56", "layout": { "h": 4, "w": 6, "x": 6, "y": 77, "i": "2e1f545d-0b03-4a6f-a4c3-aa7ff4292e44", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_PassiveOpens{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-PassiveOpens", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "PassiveOpens", "description": "一分钟内被连接的数量。", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d9cd1480-8cda-4d44-9955-277b3a0c45ba", "layout": { "h": 4, "w": 6, "x": 12, "y": 77, "i": "abdd4674-c579-4521-9b2e-b285e3823981", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(tcp_counter_from_snmp_OutSegs{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-OutSegs", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "OutSegs", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "84a23a44-7e6f-4b7e-9a28-85461ac3589c", "layout": { "h": 4, "w": 6, "x": 18, "y": 77, "i": "0e56e2bf-5b1b-4e1d-9026-005bee28618a", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_EstabResets{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-EstabResets", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "EstabResets", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "96187005-b684-46e3-8bb6-ec01984726be", "layout": { "h": 4, "w": 6, "x": 0, "y": 81, "i": "4d196151-d35b-4ff1-9e5b-0fcb3325969b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "tcp_counter_from_snmp_CurrEstab{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}", "legend": "{{project}}-{{service}}-{{endname}}-CurrEstab", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "CurrEstab", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "1f6636d3-0fb3-4f92-bf9c-7aa7f978c848", "layout": { "h": 4, "w": 6, "x": 6, "y": 81, "i": "38c302ff-7ec6-4571-90d2-be44d0b0f57a", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(tcp_counter_from_snmp_InSegs{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-InSegs", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "InSegs", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "5d95a331-fe8d-4a49-9553-0bf0ac27d0d1", "layout": { "h": 4, "w": 6, "x": 12, "y": 81, "i": "4ba2596a-776c-46e7-8d10-06b191046711", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_AttemptFails{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-AttemptFails", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "AttemptFails", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "4cc679cc-a6e5-47a6-a0a1-bdbfa1f72120", "layout": { "h": 4, "w": 6, "x": 18, "y": 81, "i": "68022581-6107-4f0f-87e5-7d52420b9a67", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_RetransSegs{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-RetransSegs", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "RetransSegs", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "min": null, "max": null, "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "67b415a3-b5ef-4b8f-80ae-7e1df2051964", "layout": { "h": 4, "w": 6, "x": 0, "y": 85, "i": "af404b96-8e9a-4406-aff1-d788ab5f820f", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_InErrs{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-InErrs", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "InErrs", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "4d345b60-a57a-4ba2-85b4-8e500990f30a", "layout": { "h": 4, "w": 6, "x": 6, "y": 85, "i": "2b14a7a0-a9ef-4f62-8602-d449e3c9c0ba", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_OutRsts{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-OutRsts", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "OutRsts", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "2b380124-d0a8-497c-a494-440545c2d38b", "layout": { "h": 4, "w": 6, "x": 12, "y": 85, "i": "3096b34b-e8aa-4693-a68e-cb10b3a10a0e", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(tcp_counter_from_snmp_InCsumErrors{project=~\"$project\", service=~\"$service\", endname=~\"$endname\"}[1m])", "legend": "{{project}}-{{service}}-{{endname}}-InCsumErrors", "refId": "A" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "InCsumErrors", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none", "decimals": 0 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } } ], "var": [ { "name": "prom", "type": "datasource", "definition": "prometheus", "defaultValue": 1 }, { "name": "project", "label": "项目名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(system_load1,project)" }, { "name": "service", "label": "服务名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(system_load1{project=\"$project\"},service)", "multi": false }, { "name": "endname", "label": "主机名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(system_load1{project=\"$project\",service=\"$service\"},endname)", "multi": true, "allOption": true } ], "version": "3.0.0" } } ``` ## redis仪表盘 ``` { "name": "Redis", "tags": "Redis Prometheus", "ident": "", "configs": { "panels": [ { "collapsed": true, "id": "2ecb82c6-4d1a-41b5-8cdc-0284db16bd54", "layout": { "h": 1, "w": 24, "x": 0, "y": 0, "i": "2ecb82c6-4d1a-41b5-8cdc-0284db16bd54", "isResizable": false }, "name": "Basic Info", "type": "row", "panels": [] }, { "type": "barGauge", "id": "b5acc352-a2bd-4afc-b6cd-d6db0905f807", "layout": { "h": 3, "w": 12, "x": 0, "y": 1, "i": "b5acc352-a2bd-4afc-b6cd-d6db0905f807", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_uptime_in_seconds{ midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Redis Uptime", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": { "util": "humantimeSeconds" } } }, { "type": "barGauge", "id": "716dc7e7-c9ec-4195-93f6-db1c572ae8b0", "layout": { "h": 3, "w": 12, "x": 12, "y": 1, "i": "716dc7e7-c9ec-4195-93f6-db1c572ae8b0", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_used_memory{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Memory Used", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "8ccada5e-02f3-4efc-9b36-2a367612e4cb", "layout": { "h": 3, "w": 12, "x": 0, "y": 4, "i": "8ccada5e-02f3-4efc-9b36-2a367612e4cb", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_connected_clients{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"} ", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Connected Clients", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "type": "barGauge", "id": "c6948161-db07-42df-beb1-765ee9c071a9", "layout": { "h": 3, "w": 12, "x": 12, "y": 7, "i": "c6948161-db07-42df-beb1-765ee9c071a9", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_maxmemory{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Max Memory Limit", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": {} } }, { "collapsed": true, "id": "bd54cf4f-1abb-4945-8aab-f89aec16daef", "layout": { "h": 1, "w": 24, "x": 0, "y": 8, "i": "bd54cf4f-1abb-4945-8aab-f89aec16daef", "isResizable": false }, "name": "Commands", "type": "row", "panels": [] }, { "type": "timeseries", "id": "3d5f8c4e-0ddf-4d68-9f6d-2cc57d864a8e", "layout": { "h": 7, "w": 8, "x": 0, "y": 9, "i": "3d5f8c4e-0ddf-4d68-9f6d-2cc57d864a8e", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(redis_total_commands_processed{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "节点每秒执行命令总数", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "344a874d-c34d-4d2d-9bb4-46e0912cd9f5", "layout": { "h": 7, "w": 8, "x": 8, "y": 9, "i": "344a874d-c34d-4d2d-9bb4-46e0912cd9f5", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "irate(redis_keyspace_hits{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_name}}-hists" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "每秒命中key数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "3c83cd35-585c-4070-a210-1f17345f13f4", "layout": { "h": 7, "w": 8, "x": 16, "y": 9, "i": "3c83cd35-585c-4070-a210-1f17345f13f4", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "topk(30, irate(redis_cmdstat_calls{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"} [1m]))", "legend": "{{midd_project}}-{{midd_name}}-{{command}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "节点执行命令最多的种类及相应数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "78ff7266-6124-4088-a047-5fcfd38d78af", "layout": { "h": 7, "w": 8, "x": 0, "y": 16, "i": "11bfce7a-bfd4-4d03-8e80-2ab9a11e2ddb", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "(irate(redis_used_cpu_user{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m]) + irate(redis_used_cpu_sys{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m]))/0.01", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "The CPU sum usage of sys and user - redis使用cpu百分比(叠加)", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "47c6326f-13f0-40b8-8cb8-cff514d81713", "layout": { "h": 7, "w": 8, "x": 8, "y": 16, "i": "496cc017-5963-4f52-87b2-a115d8e64e63", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "irate(redis_keyspace_misses{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_name}}-misses" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "每秒非命中数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "1ea61073-a46d-4d7c-b072-fcdcbc5ac084", "layout": { "h": 1, "w": 24, "x": 0, "y": 23, "i": "1ea61073-a46d-4d7c-b072-fcdcbc5ac084", "isResizable": false }, "name": "Keys", "type": "row", "panels": [] }, { "type": "timeseries", "id": "b2b4451c-4f8a-438a-8c48-69c95c68361e", "layout": { "h": 7, "w": 8, "x": 0, "y": 24, "i": "b2b4451c-4f8a-438a-8c48-69c95c68361e", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_keyspace_keys{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}-{{db}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "每DB包括的key数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "894b9beb-e764-441c-ae04-13e5dbbb901d", "layout": { "h": 7, "w": 8, "x": 8, "y": 24, "i": "894b9beb-e764-441c-ae04-13e5dbbb901d", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "sum(rate(redis_expired_keys{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])) by (midd_name)", "legend": "{{midd_project}}-{{midd_name}}-expired" }, { "expr": "rate(redis_evicted_keys{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_name}}-evicted" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "节点每秒过期/被驱逐的key数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "f721a641-28c7-4e82-a37c-ec17704a0c57", "layout": { "h": 7, "w": 8, "x": 16, "y": 24, "i": "f721a641-28c7-4e82-a37c-ec17704a0c57", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_keyspace_expires{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}-expiring" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "节点过期key数量", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "15d53cea-e159-46eb-9f44-94471c3efe3f", "layout": { "h": 7, "w": 8, "x": 0, "y": 31, "i": "488a2c8c-10ae-4a88-a599-84c134b7c1b7", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "redis_keyspace_keys{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"} - redis_keyspace_expires{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}-not expiring" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "节点非过期key数量", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "60ff41ed-9d41-40ee-a13b-c968f3ca49d0", "layout": { "h": 1, "w": 24, "x": 0, "y": 38, "i": "60ff41ed-9d41-40ee-a13b-c968f3ca49d0", "isResizable": false }, "name": "Network", "type": "row", "panels": [] }, { "type": "timeseries", "id": "1841950c-e867-4a62-b846-78754dc0e34d", "layout": { "h": 7, "w": 24, "x": 0, "y": 39, "i": "1841950c-e867-4a62-b846-78754dc0e34d", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(redis_total_net_input_bytes{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_name}}-input" }, { "expr": "rate(redis_total_net_output_bytes{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_name}}-output" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Network I/O", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "bitsIEC", "decimals": 2 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "row", "id": "e982720d-9cf8-41c5-ba26-1753fdb33c0f", "name": "基本活跃信息", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 46, "i": "e982720d-9cf8-41c5-ba26-1753fdb33c0f", "isResizable": false } }, { "type": "timeseries", "id": "a1e99987-6c23-4d70-a023-614b09e0f228", "layout": { "h": 4, "w": 8, "x": 0, "y": 47, "i": "a1e99987-6c23-4d70-a023-614b09e0f228", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "redis_connected_clients{midd_project=~\"$midd_project\",midd_type=~\"$midd_type\",midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "在线客户端数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "a5f585e4-0b1a-4294-8d96-6a2ca908d8bf", "layout": { "h": 4, "w": 8, "x": 8, "y": 47, "i": "62787b87-6c16-44f8-be3a-6ceb7f85e56b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "redis_blocked_clients{midd_project=~\"$midd_project\",midd_type=~\"$midd_type\",midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "拒绝的客户端连接数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "caab5213-eafc-4452-a217-6983fd29173f", "layout": { "h": 4, "w": 8, "x": 16, "y": 47, "i": "28f0db9c-d60d-4189-a463-ddc8d0f44b89", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "redis_master_last_io_seconds_ago{midd_project=~\"$midd_project\",midd_type=~\"$midd_type\",midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "最后一次与master通信时间", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "64f2d544-c3b4-461b-ac30-4f7de5672ab7", "layout": { "h": 4, "w": 8, "x": 0, "y": 51, "i": "987d3ae0-14c2-4c07-875b-bb11e40633f2", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "redis_connected_slaves{midd_project=~\"$midd_project\",midd_type=~\"$midd_type\",midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "当前节点连接的slave节点数量", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } } ], "var": [ { "name": "prom", "type": "datasource", "definition": "prometheus", "defaultValue": 1 }, { "name": "midd_project", "label": "项目名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(redis_uptime_in_seconds, midd_project)", "multi": true, "allOption": true }, { "name": "midd_type", "label": "服务类型", "type": "textbox", "defaultValue": "redis" }, { "name": "midd_name", "label": "服务节点", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(redis_uptime_in_seconds{midd_project=~\"$midd_project\", midd_type = \"$midd_type\"}, midd_name)", "multi": true, "allOption": true } ], "version": "3.0.0" } } ``` ## mysql仪表盘 ``` { "name": "MySQL", "tags": "Prometheus MySQL", "ident": "", "configs": { "panels": [ { "collapsed": true, "id": "fe0e2a5d-4e82-4eaf-b13a-6d98aa6b6860", "layout": { "h": 1, "i": "fe0e2a5d-4e82-4eaf-b13a-6d98aa6b6860", "isResizable": false, "w": 24, "x": 0, "y": 0 }, "name": "Basic Info", "type": "row" }, { "type": "barGauge", "id": "80079949-dbff-48fe-a1eb-54b646c30135", "layout": { "h": 3, "i": "80079949-dbff-48fe-a1eb-54b646c30135", "isResizable": true, "w": 6, "x": 0, "y": 1 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mysql_global_status_uptime{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Uptime", "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "desc" }, "options": { "standardOptions": { "util": "humantimeSeconds" } } }, { "type": "hexbin", "id": "9fd6dd09-d131-4c0e-88ea-ed62c72baf97", "layout": { "h": 3, "i": "9fd6dd09-d131-4c0e-88ea-ed62c72baf97", "isResizable": true, "w": 6, "x": 6, "y": 1 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_queries{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Current QPS", "description": "mysql_global_status_queries", "custom": { "textMode": "valueAndName", "calc": "lastNotNull", "colorRange": [ "#83c898", "#c2c2c2", "#fc653f" ], "reverseColorOrder": false, "colorDomainAuto": true }, "options": { "standardOptions": {} } }, { "type": "hexbin", "id": "24913190-b86d-44b7-a8db-555351d9d3c2", "layout": { "h": 3, "i": "24913190-b86d-44b7-a8db-555351d9d3c2", "isResizable": true, "w": 6, "x": 12, "y": 1 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mysql_global_variables_innodb_buffer_pool_size{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "InnoDB Buffer Pool", "description": "**InnoDB Buffer Pool Size**\n\nInnoDB maintains a storage area called the buffer pool for caching data and indexes in memory. Knowing how the InnoDB buffer pool works, and taking advantage of it to keep frequently accessed data in memory, is one of the most important aspects of MySQL tuning. The goal is to keep the working set in memory. In most cases, this should be between 60%-90% of available memory on a dedicated database host, but depends on many factors.", "custom": { "textMode": "valueAndName", "calc": "lastNotNull", "colorRange": [ "#83c898", "#c2c2c2", "#fc653f" ], "reverseColorOrder": false, "colorDomainAuto": true }, "options": { "standardOptions": {} } }, { "type": "hexbin", "id": "94a1e97e-2241-4e05-a9e9-a9b1e69d1070", "layout": { "h": 3, "i": "94a1e97e-2241-4e05-a9e9-a9b1e69d1070", "isResizable": true, "w": 6, "x": 18, "y": 1 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(mysql_global_status_table_locks_waited{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Table Locks Waited(5min)", "description": "**Table Locks**\n\nMySQL takes a number of different locks for varying reasons. In this graph we see how many Table level locks MySQL has requested from the storage engine. In the case of InnoDB, many times the locks could actually be row locks as it only takes table level locks in a few specific cases.\n\nIt is most useful to compare Locks Immediate and Locks Waited. If Locks waited is rising, it means you have lock contention. Otherwise, Locks Immediate rising and falling is normal activity.", "custom": { "textMode": "valueAndName", "calc": "lastNotNull", "colorRange": [ "#83c898", "#c2c2c2", "#fc653f" ], "reverseColorOrder": false, "colorDomainAuto": true }, "options": { "standardOptions": {} } }, { "collapsed": true, "id": "ca82d30f-8e0d-4caa-8a00-2ed9efe4ad85", "layout": { "h": 1, "i": "ca82d30f-8e0d-4caa-8a00-2ed9efe4ad85", "isResizable": false, "w": 24, "x": 0, "y": 4 }, "name": "Connections", "type": "row" }, { "type": "timeseries", "id": "e2c85e72-0286-49bc-8ddb-5fba5f449b53", "layout": { "h": 7, "i": "e2c85e72-0286-49bc-8ddb-5fba5f449b53", "isResizable": true, "w": 12, "x": 0, "y": 5 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mysql_global_status_threads_connected{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Connections" }, { "expr": "mysql_global_status_max_used_connections{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Max Used Connections" }, { "expr": "mysql_global_variables_max_connections{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Max Connections" }, { "expr": "increase(mysql_global_status_aborted_connects{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Aborted Connections" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Connections", "description": "**Max Connections** \n\nMax Connections is the maximum permitted number of simultaneous client connections. By default, this is 151. Increasing this value increases the number of file descriptors that mysqld requires. If the required number of descriptors are not available, the server reduces the value of Max Connections.\n\nmysqld actually permits Max Connections + 1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege, such as root.\n\nMax Used Connections is the maximum number of connections that have been in use simultaneously since the server started.\n\nConnections is the number of connection attempts (successful or not) to the MySQL server.", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "fbd43ac2-159d-4e55-8bc6-800d1bbfbd59", "layout": { "h": 7, "i": "fbd43ac2-159d-4e55-8bc6-800d1bbfbd59", "isResizable": true, "w": 12, "x": 12, "y": 5 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mysql_global_status_threads_connected{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}Threads Connected" }, { "expr": "mysql_global_status_threads_running{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}Threads Running" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Client Thread Activity", "description": "Threads Connected is the number of open connections, while Threads Running is the number of threads not sleeping.", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "cb81def4-ac63-4d42-b66e-440f9061794b", "layout": { "h": 1, "i": "cb81def4-ac63-4d42-b66e-440f9061794b", "isResizable": false, "w": 24, "x": 0, "y": 12 }, "name": "Query Performance", "type": "row" }, { "type": "timeseries", "id": "5fa65a30-a49b-457f-b46a-11d2029188bd", "layout": { "h": 7, "i": "5fa65a30-a49b-457f-b46a-11d2029188bd", "isResizable": true, "w": 12, "x": 0, "y": 13 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_created_tmp_tables{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Created Tmp Tables" }, { "expr": "rate(mysql_global_status_created_tmp_disk_tables{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Created Tmp Disk Tables" }, { "expr": "rate(mysql_global_status_created_tmp_files{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Created Tmp Files" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Temporary Objects", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.64, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "20efd251-6207-4cec-aa3b-4351e8e9b125", "layout": { "h": 7, "i": "20efd251-6207-4cec-aa3b-4351e8e9b125", "isResizable": true, "w": 12, "x": 12, "y": 13 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_select_full_join{ midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Select Full Join" }, { "expr": "rate(mysql_global_status_select_full_range_join{ midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Select Full Range Join" }, { "expr": "rate(mysql_global_status_select_range{ midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Select Range" }, { "expr": "rate(mysql_global_status_select_range_check{ midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Select Range Check" }, { "expr": "rate(mysql_global_status_select_scan{ midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Select Scan" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Select Types", "description": "**MySQL Select Types**\n\nAs with most relational databases, selecting based on indexes is more efficient than scanning an entire table's data. Here we see the counters for selects not done with indexes.\n\n* ***Select Scan*** is how many queries caused full table scans, in which all the data in the table had to be read and either discarded or returned.\n* ***Select Range*** is how many queries used a range scan, which means MySQL scanned all rows in a given range.\n* ***Select Full Join*** is the number of joins that are not joined on an index, this is usually a huge performance hit.", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.41, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "a4d0c5fb-04e0-4627-8722-ae996d70e2aa", "layout": { "h": 7, "i": "a4d0c5fb-04e0-4627-8722-ae996d70e2aa", "isResizable": true, "w": 12, "x": 0, "y": 20 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_queries{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL QPS", "description": "", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "2e13ada4-1128-440d-9360-028f16c3779b", "layout": { "h": 7, "i": "2e13ada4-1128-440d-9360-028f16c3779b", "isResizable": true, "w": 12, "x": 12, "y": 20 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "increase(mysql_global_status_slow_queries{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[30s])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Slow Queries" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Slow Queries", "description": "**MySQL Slow Queries**\n\nSlow queries are defined as queries being slower than the long_query_time setting. For example, if you have long_query_time set to 3, all queries that take longer than 3 seconds to complete will show on this graph.", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "bars", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.81, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "c9df805c-8ae7-41d7-b28b-575f478fd9ce", "layout": { "h": 1, "i": "c9df805c-8ae7-41d7-b28b-575f478fd9ce", "isResizable": false, "w": 24, "x": 0, "y": 27 }, "name": "Network", "type": "row" }, { "type": "timeseries", "id": "6107714f-bedd-437c-b6e4-d6eb74db6d30", "layout": { "h": 7, "i": "6107714f-bedd-437c-b6e4-d6eb74db6d30", "isResizable": true, "w": 24, "x": 0, "y": 28 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_bytes_received{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Inbound" }, { "expr": "rate(mysql_global_status_bytes_sent{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Outbound" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Network Traffic", "description": "**MySQL Network Traffic**\n\nHere we can see how much network traffic is generated by MySQL. Outbound is network traffic sent from MySQL and Inbound is network traffic MySQL has received.", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesSI", "decimals": 2 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "00fd2b70-a133-4ad7-bd56-69a3c91ecf0c", "layout": { "h": 1, "i": "00fd2b70-a133-4ad7-bd56-69a3c91ecf0c", "isResizable": false, "w": 24, "x": 0, "y": 35 }, "name": "Commands, Handlers", "type": "row" }, { "type": "timeseries", "id": "f90ca2bc-0809-45f6-88b6-e258805def04", "layout": { "h": 7, "i": "f90ca2bc-0809-45f6-88b6-e258805def04", "isResizable": true, "w": 24, "x": 0, "y": 36 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "topk(10, rate(mysql_global_status_commands_total{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[1m])>0)", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Com_{{command}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Top Command Counters", "description": "**Top Command Counters**\n\nThe Com_{{xxx}} statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to [``DELETE``](https://dev.mysql.com/doc/refman/5.7/en/delete.html) and [``UPDATE``](https://dev.mysql.com/doc/refman/5.7/en/update.html) statements that use multiple-table syntax.", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "decimals": 2 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.2, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "74e1844d-a918-48fa-a29f-6535dc087dac", "layout": { "h": 7, "i": "74e1844d-a918-48fa-a29f-6535dc087dac", "isResizable": true, "w": 12, "x": 0, "y": 43 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_handlers_total{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", handler!~\"commit|rollback|savepoint.*|prepare\"}[5m])", "legend": "{{handler}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Handlers", "description": "**MySQL Handlers**\n\nHandler statistics are internal statistics on how MySQL is selecting, updating, inserting, and modifying rows, tables, and indexes.\n\nThis is in fact the layer between the Storage Engine and MySQL.\n\n* `read_rnd_next` is incremented when the server performs a full table scan and this is a counter you don't really want to see with a high value.\n* `read_key` is incremented when a read is done with an index.\n* `read_next` is incremented when the storage engine is asked to 'read the next index entry'. A high value means a lot of index scans are being done.", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "decimals": 3 }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "b2c3a13d-898f-407b-b6a9-db852072b12f", "layout": { "h": 7, "i": "b2c3a13d-898f-407b-b6a9-db852072b12f", "isResizable": true, "w": 12, "x": 12, "y": 43 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_handlers_total{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", handler=~\"commit|rollback|savepoint.*|prepare\"}[5m])", "legend": "{{handler}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Transaction Handlers", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "c32a02da-6c61-4b9e-9365-c0b56088fabc", "layout": { "h": 1, "i": "c32a02da-6c61-4b9e-9365-c0b56088fabc", "isResizable": false, "w": 24, "x": 0, "y": 50 }, "name": "Open Files", "type": "row" }, { "type": "timeseries", "id": "fc13eadb-890d-4184-ac16-943d54188db8", "layout": { "h": 7, "i": "fc13eadb-890d-4184-ac16-943d54188db8", "isResizable": true, "w": 24, "x": 0, "y": 51 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mysql_global_variables_open_files_limit{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Open Files Limit" }, { "expr": "mysql_global_status_open_files{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Open Files" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Open Files", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "collapsed": true, "id": "6f596e65-3e4b-4d9a-aad7-a32c8c7b8239", "layout": { "h": 1, "i": "6f596e65-3e4b-4d9a-aad7-a32c8c7b8239", "isResizable": false, "w": 24, "x": 0, "y": 58 }, "name": "Table Openings", "type": "row" }, { "type": "timeseries", "id": "0b78fbb5-a0b4-4a1b-98b1-af15bc91779d", "layout": { "h": 7, "i": "0b78fbb5-a0b4-4a1b-98b1-af15bc91779d", "isResizable": true, "w": 12, "x": 0, "y": 59 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "rate(mysql_global_status_table_open_cache_hits{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])\n/\n(\nrate(mysql_global_status_table_open_cache_hits{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])\n+\nrate(mysql_global_status_table_open_cache_misses{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}[5m])\n)", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Table Open Cache Hit Ratio" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "Table Open Cache Hit Ratio Mysql 5.6.6+", "description": "**MySQL Table Open Cache Status**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percentUnit" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "948ad10b-8b22-4d42-9e94-99ef09e12927", "layout": { "h": 7, "i": "948ad10b-8b22-4d42-9e94-99ef09e12927", "isResizable": true, "w": 12, "x": 12, "y": 59 }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "expr": "mysql_global_status_open_tables{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Open Tables" }, { "expr": "mysql_global_variables_table_open_cache{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-Table Open Cache" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "MySQL Open Tables", "description": "**MySQL Open Tables**\n\nThe recommendation is to set the `table_open_cache_instances` to a loose correlation to virtual CPUs, keeping in mind that more instances means the cache is split more times. If you have a cache set to 500 but it has 10 instances, each cache will only have 50 cached.\n\nThe `table_definition_cache` and `table_open_cache` can be left as default as they are auto-sized MySQL 5.6 and above (ie: do not set them to any value).", "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } } ], "var": [ { "definition": "prometheus", "name": "prom", "type": "datasource" }, { "name": "midd_project", "label": "项目名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(midd_project)" }, { "name": "midd_type", "label": "中间件类型", "type": "textbox", "defaultValue": "mysql" }, { "name": "midd_name", "label": "节点实例", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(mysql_up{midd_project=\"$midd_project\",midd_type=\"$midd_type\"},midd_name)", "multi": true, "allOption": true }, { "name": "midd_version", "label": "软件版本", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(mysql_up{midd_project=\"$midd_project\",midd_type=\"$midd_type\"},version)", "multi": true } ], "version": "3.0.0" } } ``` ## 容器仪表盘 ``` { "name": "Container", "tags": "", "ident": "", "configs": { "version": "3.0.0", "links": [], "var": [ { "name": "prom", "label": "数据源", "type": "datasource", "definition": "prometheus", "defaultValue": 1 }, { "name": "midd_project", "label": "项目名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(docker_container_cpu_usage_total, midd_project)", "reg": "", "multi": true, "allOption": true, "allValue": ".*" }, { "name": "midd_type", "label": "服务类型", "type": "textbox", "defaultValue": "container" }, { "name": "midd_name", "label": "服务节点", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(docker_container_cpu_usage_total{midd_project=~\"$midd_project\", midd_type = \"$midd_type\"}, midd_name)", "reg": "", "multi": true, "allOption": true, "allValue": ".*" }, { "name": "container_image", "label": "镜像名称", "type": "query", "datasource": { "cate": "prometheus", "value": "${prom}" }, "definition": "label_values(docker_container_cpu_usage_total{midd_project=~\"$midd_project\", midd_type = \"$midd_type\", midd_name=\"$midd_name\"}, container_image)", "reg": "", "multi": true, "allOption": true, "allValue": ".*" } ], "panels": [ { "type": "row", "id": "38ee9504-730e-40b0-9e89-999a0e59188d", "name": "一、总览", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 0, "i": "38ee9504-730e-40b0-9e89-999a0e59188d", "isResizable": false }, "panels": [] }, { "type": "stat", "id": "7e594608-2428-470b-a4fb-8df405df56a6", "layout": { "h": 3, "w": 4, "x": 0, "y": 1, "i": "a448bfe3-badc-406a-803f-f59907b45cce", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "sum(docker_n_containers{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"})", "legend": "" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "当前节点承载的容器数量", "links": [], "custom": { "textMode": "value", "colorMode": "value", "calc": "min", "valueField": "Value", "colSpan": 1, "textSize": {} }, "options": { "valueMappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 80 } ] } } }, { "type": "barGauge", "id": "4f2a7bbd-9dff-4817-a212-3ea7e270895c", "layout": { "h": 6, "w": 20, "x": 4, "y": 1, "i": "1967ffc8-4f6c-4e3e-a69c-94c37597d6f6", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "docker_container_status_uptime{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器运行时长排行榜", "links": [], "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "asc" }, "options": { "standardOptions": { "util": "seconds" } } }, { "type": "stat", "id": "071da60c-40c7-4047-8edd-24ed86fd98d1", "layout": { "h": 3, "w": 4, "x": 0, "y": 4, "i": "33e8d734-eb58-430e-ba26-5d3d4a01f79f", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "sum(docker_n_containers_running{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"})", "legend": "" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "当前节点正在运行的容器数量", "links": [], "custom": { "textMode": "value", "colorMode": "value", "calc": "min", "valueField": "Value", "colSpan": 1, "textSize": {} }, "options": { "valueMappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 80 } ] } } }, { "type": "stat", "id": "becfde69-32f5-4ce6-af45-32191f7b25d3", "layout": { "h": 3, "w": 4, "x": 0, "y": 7, "i": "6c50d764-a461-48a8-ac9c-5fe8ad7db2f3", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "sum(docker_n_containers_stopped{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"})", "legend": "" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "当前节点停止运行的容器数量", "links": [], "custom": { "textMode": "value", "colorMode": "value", "calc": "min", "valueField": "Value", "colSpan": 1, "textSize": {} }, "options": { "valueMappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 1 } ] } } }, { "type": "barGauge", "id": "c38b68e9-e58a-41d3-94a6-c22aeb26445c", "layout": { "h": 6, "w": 20, "x": 4, "y": 7, "i": "5a24034b-86bb-4bcf-9391-69cb7505af39", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "docker_n_containers_stopped{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"} > 0", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "当前暂停容器节点数量排行榜", "links": [], "custom": { "calc": "lastNotNull", "baseColor": "#9470FF", "serieWidth": 20, "sortOrder": "asc" }, "options": { "standardOptions": { "util": "none" } } }, { "type": "stat", "id": "4d4f3c50-b14b-45d3-aeb7-afddb87eca32", "layout": { "h": 3, "w": 4, "x": 0, "y": 10, "i": "212b557b-84c2-4ffe-8d55-a85d404e7e6f", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${prom}", "targets": [ { "refId": "A", "expr": "sum(docker_n_containers_paused{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\"})", "legend": "" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "当前节点暂停的容器数量", "links": [], "custom": { "textMode": "value", "colorMode": "value", "calc": "min", "valueField": "Value", "colSpan": 1, "textSize": {} }, "options": { "valueMappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "standardOptions": { "util": "none" }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 1 } ] } } }, { "type": "row", "id": "c56eef30-6444-464f-9512-267fa06c57df", "name": "二、CPU", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 25, "i": "c56eef30-6444-464f-9512-267fa06c57df", "isResizable": false } }, { "type": "timeseries", "id": "8e245ba7-a608-47db-ac24-5413430dfa0e", "layout": { "h": 6, "w": 8, "x": 0, "y": 26, "i": "8e245ba7-a608-47db-ac24-5413430dfa0e", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "C", "expr": "docker_container_cpu_usage_percent{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}", "instant": false } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "总的CPU使用率", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "percent", "max": 400 }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 100 } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.3, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "254b110a-57da-4e10-888b-ea564dfbc7d5", "layout": { "h": 6, "w": 8, "x": 8, "y": 26, "i": "875c6be9-3798-4d28-b8ef-d3df68b04698", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "C", "expr": "rate(docker_container_cpu_usage_in_kernelmode{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])/rate(docker_container_cpu_usage_total{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "内核态CPU使用率", "links": [], "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "none", "max": 120 }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 80 } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.3, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "3fadfed6-a123-4c4d-b51c-92247e03587d", "layout": { "h": 6, "w": 8, "x": 16, "y": 26, "i": "f12ba4ae-fad6-4fda-94fa-eda14917aac3", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "C", "expr": "rate(docker_container_cpu_usage_in_usermode{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])/rate(docker_container_cpu_usage_total{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "用户态CPU使用率", "links": [], "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "none", "max": 120 }, "thresholds": { "steps": [ { "color": "#73BF69", "value": null, "type": "base" }, { "color": "#F2495C", "value": 80 } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.3, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "row", "id": "2a2f2a92-f014-4494-a962-8e1d6702bd62", "name": "三、内存", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 32, "i": "2a2f2a92-f014-4494-a962-8e1d6702bd62", "isResizable": false }, "panels": [] }, { "type": "timeseries", "id": "4f387f1b-5fc9-4aed-b711-a79846ace5a1", "layout": { "h": 6, "w": 12, "x": 0, "y": 33, "i": "4f387f1b-5fc9-4aed-b711-a79846ace5a1", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "docker_container_mem_usage_percent{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "总的内存使用率", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "b5c301ea-f19d-473b-9da7-9957124751e5", "layout": { "h": 6, "w": 12, "x": 12, "y": 33, "i": "8db1250a-c0af-4ba4-b804-5b3f7bd672fe", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "docker_container_mem_total_rss{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "使用真实内存总量", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "0855c42c-dcc0-4d35-93ef-486f52fbe349", "layout": { "h": 6, "w": 12, "x": 0, "y": 39, "i": "35325cf6-375c-4223-ab1d-ee42269fff84", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "docker_container_mem_fail_count{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "失败的内存数量", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "de788617-8366-4322-997d-d3febca7539a", "layout": { "h": 6, "w": 12, "x": 12, "y": 39, "i": "402cbf2b-41f7-4b91-b103-47975aa9d85a", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "docker_container_mem_total_cache{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "使用缓存内存总量", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "asc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "row", "id": "1ed340ba-82e6-4e22-87bf-81e8f46af8eb", "name": "四、网络", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 45, "i": "1ed340ba-82e6-4e22-87bf-81e8f46af8eb", "isResizable": false }, "panels": [] }, { "type": "timeseries", "id": "9b10a7e3-73df-4c76-8b82-8adb281cc4d6", "layout": { "h": 6, "w": 12, "x": 0, "y": 46, "i": "e3ebbfbb-bfe1-4c78-95bf-fa1db31de6f1", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "rate(docker_container_net_rx_bytes{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}-RECEIVED" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "入流量字节数", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "bitsSI" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "c778cb12-f813-493d-8939-55d046fe7e9c", "layout": { "h": 6, "w": 12, "x": 12, "y": 46, "i": "3146af48-9852-4dca-a573-295c89811484", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "rate(docker_container_net_tx_bytes{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}-TRANSFER" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "出流量字节数", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": { "util": "bitsSI" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "28c89bf8-87fe-4be3-ac69-9d6c2d73bb00", "layout": { "h": 6, "w": 12, "x": 0, "y": 52, "i": "a44c1ba6-e299-461f-847e-0aaab1d95649", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "rate(docker_container_net_rx_dropped{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}-RECEIVED" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "入流量丢包数", "links": [], "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "ea62da4d-f61e-4df2-a2ed-164c6982a5d2", "layout": { "h": 6, "w": 12, "x": 12, "y": 52, "i": "7a11082e-a702-48f1-9eb5-06be71c5e37a", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "rate(docker_container_net_tx_dropped{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}-TRANSFER" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "出流量丢包数", "links": [], "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "ceb3bde4-8e03-488b-b818-e393e5ad2522", "layout": { "h": 6, "w": 12, "x": 0, "y": 58, "i": "23ece3e8-fce8-4385-8fcb-49a7915cdb19", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "rate(docker_container_net_rx_errors{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}-RECEIVED" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "入流量错误数", "links": [], "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "2cb2f141-eba5-42c7-8f55-e83f14cf3a66", "layout": { "h": 6, "w": 12, "x": 12, "y": 58, "i": "b5b05a5f-fe51-4a35-beb5-d55882ee7ae4", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": 1, "targets": [ { "refId": "A", "expr": "rate(docker_container_net_tx_errors{midd_project=~\"$midd_project\", midd_type=~\"$midd_type\", midd_name=~\"$midd_name\", container_image=~\"$container_image\"}[1m])", "legend": "{{midd_project}}-{{midd_type}}-{{midd_name}}-{{container_image}}-TRANSFER" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "出流量错误数", "links": [], "options": { "tooltip": { "mode": "all", "sort": "desc" }, "legend": { "displayMode": "list", "placement": "bottom" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "linear", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "noraml", "scaleDistribution": { "type": "linear" } } }, { "type": "row", "id": "b80b6c94-3007-4efb-b7a5-4b99b1241cad", "name": "五、硬盘", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 64, "i": "b80b6c94-3007-4efb-b7a5-4b99b1241cad", "isResizable": false } } ] } } ``` ![2023-11-29T03:24:18.png][7] # 五、增加告警配置 ## linux_by_categraf ``` [ { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Hard disk - expected to be written full in 4 hours - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 1, "severities": [ 1 ], "disabled": 1, "prom_for_duration": 60, "prom_ql": "predict_linear(disk_free[1h], 4*3600) < 0", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "predict_linear(disk_free[1h], 4*3600) < 0", "severity": 1 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [ "email", "dingtalk", "wecom" ], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Hard disk - IO is a bit busy - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "rate(diskio_io_time[1m])/10 > 99", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "rate(diskio_io_time[1m])/10 > 99", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [ "email", "dingtalk", "wecom" ], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Lost connection with monitoring target - categraf", "note": "", "prod": "host", "algorithm": "", "algo_params": null, "delay": 0, "severity": 0, "severities": [ 0 ], "disabled": 0, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "inhibit": false, "queries": [ { "key": "all_hosts", "op": "==", "values": [] } ], "triggers": [ { "duration": 60, "severity": 2, "type": "target_miss" } ] }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": {}, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Machine load - high memory, please pay attention - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 0, "severities": [ 3, 2, 1 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "inhibit": true, "queries": [ { "prom_ql": "mem_available_percent < 25", "severity": 3 }, { "prom_ql": "mem_available_percent < 15", "severity": 2 }, { "prom_ql": "mem_available_percent < 5", "severity": 1 } ] }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [ "email", "dingtalk", "wecom" ], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": {}, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "number of TME_WAIT exceeds 20,000 - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "netstat_tcp_time_wait > 20000", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "netstat_tcp_time_wait > 20000", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [ "email", "dingtalk", "wecom" ], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "packet loss in the inbound direction - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 3, "severities": [ 3 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "increase(net_drop_in[1m]) > 0", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "increase(net_drop_in[1m]) > 0", "severity": 3 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [ "email", "dingtalk", "wecom" ], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "packet loss in the outbound direction - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 3, "severities": [ 3 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "increase(net_drop_out[1m]) > 0", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "increase(net_drop_out[1m]) > 0", "severity": 3 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [ "email", "dingtalk", "wecom" ], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "大于200G的盘,空间不足了", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 0, "severities": [ 3, 2, 1 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "inhibit": true, "queries": [ { "prom_ql": "disk_free/1024/1024/1024 < 20 and disk_total/1024/1024/1024 >= 200", "severity": 3 }, { "prom_ql": "disk_free/1024/1024/1024 < 10 and disk_total/1024/1024/1024 >= 200", "severity": 2 }, { "prom_ql": "disk_free/1024/1024/1024 < 2 and disk_total/1024/1024/1024 >= 200", "severity": 1 } ] }, "prom_eval_interval": 30, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "0", "1", "2", "3", "4", "5", "6" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": {}, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "小于200G的盘,空间不足了", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 0, "severities": [ 3, 2, 1 ], "disabled": 0, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "inhibit": true, "queries": [ { "prom_ql": "disk_used_percent > 90 and disk_total/1024/1024/1024 < 200", "severity": 3 }, { "prom_ql": "disk_used_percent > 95 and disk_total/1024/1024/1024 < 200", "severity": 2 }, { "prom_ql": "disk_used_percent > 99 and disk_total/1024/1024/1024 < 200", "severity": 1 } ] }, "prom_eval_interval": 30, "enable_stime": "", "enable_stimes": [ "00:00" ], "enable_etime": "", "enable_etimes": [ "23:59" ], "enable_days_of_week": null, "enable_days_of_weeks": [ [ "0", "1", "2", "3", "4", "5", "6" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [], "annotations": {}, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Linux", "__group__": "linux_by_categraf" } ] ``` ## redis_by_categraf ``` [ { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "High Redis eviction rate", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "(sum(rate(redis_evicted_keys[5m])) / sum(redis_keyspace_keys)) > 0.1", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=RedisHighKeysEvictionRatio" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Redis", "__group__": "redis_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "High Redis memory usage rate", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "redis_maxmemory > 0 and (redis_used_memory / redis_maxmemory) > 0.85", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=RedisHighMemoryUsage" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Redis", "__group__": "redis_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "High Redis Ping latency (above 100 milliseconds)", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "redis_ping_use_seconds > 0.1", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=HighPingLatency" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Redis", "__group__": "redis_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Low Redis hit rate", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "rate(redis_keyspace_hits[5m])\n/\n(rate(redis_keyspace_misses[5m]) + rate(redis_keyspace_hits[5m]))\n< 0.9", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=RedisLowHitRatio" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Redis", "__group__": "redis_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Redis connection refused", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "(rate(redis_rejected_connections[5m])) > 0", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=RedisRejectedConnHigh" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Redis", "__group__": "redis_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Redis has just been restarted, please be aware", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 3, "severities": [ 3 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "redis_uptime_in_seconds < 600", "severity": 3 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=RedisLowUptime" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "Redis", "__group__": "redis_by_categraf" } ] ``` ## mysql_by_categraf ``` [ { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "A slow query has occurred in Mysql within the last minute - categraf", "note": "MySQL server mysql has some new slow query", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 120, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "increase(mysql_global_status_slow_queries[1m]) > 0", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlSlowQueries" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "More than 60% of the connections in Mysql are in a running state - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 120, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "avg by (instance) (mysql_global_status_threads_running) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 60", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlHighThreadsRunning" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Mysql has just restarted. Please be advised - categraf", "note": "MySQL has just been restarted, less than one minute ago", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 3, "severities": [ 3 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "mysql_global_status_uptime < 60", "severity": 3 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlRestarted" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Mysql has opened a large number of file handles. Please be aware - categraf", "note": "More than 80% of MySQL files open", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 120, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "avg by (instance) (mysql_global_status_open_files) / avg by (instance)(mysql_global_variables_open_files_limit) * 100 > 80", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlHighOpenFiles" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "Mysql instance has crashed - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 1, "severities": [ 1 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "mysql_up == 0", "severity": 1 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlDown" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "MysqlInnodbLogWaits - categraf", "note": "MySQL innodb log writes stalling", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "rate(mysql_global_status_innodb_log_waits[15m]) > 10", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlInnodbLogWaits" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "MysqlSlaveIoThreadNotRunning - categraf", "note": "MySQL Slave IO thread not running", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 1, "severities": [ 1 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0", "severity": 1 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlSlaveIoThreadNotRunning" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "MysqlSlaveReplicationLag - categraf", "note": "", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 1, "severities": [ 1 ], "disabled": 1, "prom_for_duration": 60, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) (mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay) > 30", "severity": 1 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlSlaveReplicationLag" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "MysqlSlaveSqlThreadNotRunning - categraf", "note": "MySQL Slave SQL thread not running", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 1, "severities": [ 1 ], "disabled": 1, "prom_for_duration": 0, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0", "severity": 1 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlSlaveSqlThreadNotRunning" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" }, { "id": 0, "group_id": 0, "cate": "prometheus", "datasource_ids": [ 0 ], "cluster": "", "name": "The number of connections in Mysql has exceeded 80% - categraf", "note": "More than 80% of MySQL connections are in use", "prod": "metric", "algorithm": "", "algo_params": null, "delay": 0, "severity": 2, "severities": [ 2 ], "disabled": 1, "prom_for_duration": 120, "prom_ql": "", "rule_config": { "algo_params": null, "inhibit": false, "prom_ql": "", "queries": [ { "prom_ql": "avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 80", "severity": 2 } ], "severity": 0 }, "prom_eval_interval": 15, "enable_stime": "00:00", "enable_stimes": [ "00:00" ], "enable_etime": "23:59", "enable_etimes": [ "23:59" ], "enable_days_of_week": [ "1", "2", "3", "4", "5", "6", "0" ], "enable_days_of_weeks": [ [ "1", "2", "3", "4", "5", "6", "0" ] ], "enable_in_bg": 0, "notify_recovered": 1, "notify_channels": [], "notify_groups_obj": null, "notify_groups": null, "notify_repeat_step": 60, "notify_max_number": 0, "recover_duration": 0, "callbacks": [], "runbook_url": "", "append_tags": [ "alertname=MysqlTooManyConnections" ], "annotations": null, "extra_config": null, "create_at": 0, "create_by": "", "update_at": 0, "update_by": "", "__cate__": "MySQL", "__group__": "mysql_by_categraf" } ] ``` ![2023-11-29T04:54:10.png][8] ![2023-11-29T04:55:37.png][9] [1]: https://www.sddts.cn/usr/uploads/2023/11/1032401344.png [2]: https://www.sddts.cn/usr/uploads/2023/11/161517617.png [3]: https://www.sddts.cn/usr/uploads/2023/11/278361861.png [4]: https://www.sddts.cn/usr/uploads/2023/11/3188719913.png [5]: https://www.sddts.cn/usr/uploads/2023/11/1472992667.png [6]: https://www.sddts.cn/usr/uploads/2023/11/1419123117.png [7]: https://www.sddts.cn/usr/uploads/2023/11/691235613.png [8]: https://www.sddts.cn/usr/uploads/2023/11/3972041890.png [9]: https://www.sddts.cn/usr/uploads/2023/11/2068175443.png 最后修改:2024 年 05 月 11 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏