From d306e2488a23141a17a5c1542dbdac4f884347dd Mon Sep 17 00:00:00 2001 From: kongfei605 Date: Tue, 30 Jun 2026 12:04:05 +0800 Subject: [PATCH] feat(inputs): add grafana dashboards --- inputs/README.md | 6 +- inputs/elasticsearch/dashboard_grafana.json | 2789 ++++++ inputs/haproxy/dashboard_grafana.json | 861 ++ inputs/http_response/dashboard_grafana.json | 163 + inputs/ipmi/ipmi_dash_grafana.json | 789 ++ inputs/kafka/dashboard-by-topic_grafana.json | 490 + .../kafka/dashboard-key-metrics_grafana.json | 1127 +++ inputs/kafka/dashboard_grafana.json | 652 ++ .../dashboard-by-ident_grafana.json | 759 ++ inputs/kube_proxy/dashboard_grafana.json | 759 ++ .../kube_state_metrics/dashboard_grafana.json | 2018 +++++ .../kubelet/dashboard-by-ident_grafana.json | 757 ++ inputs/kubelet/dashboard_grafana.json | 757 ++ .../kube_resources_dash_grafana.json | 1090 +++ inputs/mongodb/dashboard_grafana.json | 1404 +++ .../mysql/dashboard-by-aws-rds_grafana.json | 1090 +++ inputs/mysql/dashboard-by-ident_grafana.json | 2094 +++++ .../mysql/dashboard-by-instance_grafana.json | 2036 +++++ .../dashboard-by-ziv_grafana.json | 199 + inputs/net_response/dashboard_grafana.json | 141 + .../dashboards_grafana.json | 286 + inputs/nginx_vts/dashboards_grafana.json | 1054 +++ inputs/oracle/dashboard_grafana.json | 1351 +++ inputs/ping/dashboard-2.0_grafana.json | 304 + inputs/ping/dashboard_grafana.json | 152 + inputs/postgresql/dashboard_grafana.json | 971 ++ inputs/rabbitmq/dashboard-3.8_grafana.json | 1901 ++++ inputs/rabbitmq/dashboard_grafana.json | 2579 ++++++ inputs/redis/dashboard_grafana.json | 993 ++ inputs/sqlserver/sqlserver_dash_grafana.json | 684 ++ inputs/switch_legacy/dashboard_grafana.json | 829 ++ inputs/system/README.md | 14 +- inputs/system/dashboard_grafana.json | 7983 +++++++++++++++++ inputs/tomcat/dashboard_grafana.json | 717 ++ inputs/vsphere/dashboard_grafana.json | 1503 ++++ inputs/vsphere/dashboards_grafana.json | 1503 ++++ inputs/zookeeper/dashboard_grafana.json | 967 ++ 37 files changed, 43770 insertions(+), 2 deletions(-) create mode 100644 inputs/elasticsearch/dashboard_grafana.json create mode 100644 inputs/haproxy/dashboard_grafana.json create mode 100644 inputs/http_response/dashboard_grafana.json create mode 100644 inputs/ipmi/ipmi_dash_grafana.json create mode 100644 inputs/kafka/dashboard-by-topic_grafana.json create mode 100644 inputs/kafka/dashboard-key-metrics_grafana.json create mode 100644 inputs/kafka/dashboard_grafana.json create mode 100644 inputs/kube_proxy/dashboard-by-ident_grafana.json create mode 100644 inputs/kube_proxy/dashboard_grafana.json create mode 100644 inputs/kube_state_metrics/dashboard_grafana.json create mode 100644 inputs/kubelet/dashboard-by-ident_grafana.json create mode 100644 inputs/kubelet/dashboard_grafana.json create mode 100644 inputs/kubernetes/kube_resources_dash_grafana.json create mode 100644 inputs/mongodb/dashboard_grafana.json create mode 100644 inputs/mysql/dashboard-by-aws-rds_grafana.json create mode 100644 inputs/mysql/dashboard-by-ident_grafana.json create mode 100644 inputs/mysql/dashboard-by-instance_grafana.json create mode 100644 inputs/net_response/dashboard-by-ziv_grafana.json create mode 100644 inputs/net_response/dashboard_grafana.json create mode 100644 inputs/nginx_upstream_check/dashboards_grafana.json create mode 100644 inputs/nginx_vts/dashboards_grafana.json create mode 100644 inputs/oracle/dashboard_grafana.json create mode 100644 inputs/ping/dashboard-2.0_grafana.json create mode 100644 inputs/ping/dashboard_grafana.json create mode 100644 inputs/postgresql/dashboard_grafana.json create mode 100644 inputs/rabbitmq/dashboard-3.8_grafana.json create mode 100644 inputs/rabbitmq/dashboard_grafana.json create mode 100644 inputs/redis/dashboard_grafana.json create mode 100644 inputs/sqlserver/sqlserver_dash_grafana.json create mode 100644 inputs/switch_legacy/dashboard_grafana.json create mode 100644 inputs/system/dashboard_grafana.json create mode 100644 inputs/tomcat/dashboard_grafana.json create mode 100644 inputs/vsphere/dashboard_grafana.json create mode 100644 inputs/vsphere/dashboards_grafana.json create mode 100644 inputs/zookeeper/dashboard_grafana.json diff --git a/inputs/README.md b/inputs/README.md index 7c59fe8a..5f11db9b 100644 --- a/inputs/README.md +++ b/inputs/README.md @@ -1,3 +1,7 @@ # inputs -每个采集插件就是一个目录,大家可以点击各个目录进去查看,每个插件的使用方式,都提供了 README 和默认配置,一目了然。如果想贡献插件,可以拷贝 tpl 目录的代码,基于 tpl 做改动。 \ No newline at end of file +每个采集插件就是一个目录,大家可以点击各个目录进去查看,每个插件的使用方式,都提供了 README 和默认配置,一目了然。如果想贡献插件,可以拷贝 tpl 目录的代码,基于 tpl 做改动。 + +## 监控大盘 + +插件目录下的 `dashboard*.json`、`dashboards.json`、`*_dash.json` 等文件通常是夜莺 Dashboard;对应的 `*_grafana.json` 文件是 Grafana Dashboard,可在 Grafana 中选择 Prometheus 兼容数据源后导入使用。 diff --git a/inputs/elasticsearch/dashboard_grafana.json b/inputs/elasticsearch/dashboard_grafana.json new file mode 100644 index 00000000..15187965 --- /dev/null +++ b/inputs/elasticsearch/dashboard_grafana.json @@ -0,0 +1,2789 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Panel 1", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "min(elasticsearch_cluster_health_status_code{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 2, + "title": "Nodes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "min(elasticsearch_cluster_health_number_of_nodes{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Data Nodes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "min(elasticsearch_cluster_health_number_of_data_nodes{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 4, + "title": "CPU Util Percent", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_process_cpu_percent{cluster=\"$cluster\", node_host=~\"$node_host\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "JVM Heap Util Percent", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_jvm_mem_heap_used_percent{cluster=\"$cluster\", node_host=~\"$node_host\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "Pending Tasks", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_number_of_pending_tasks{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 7, + "title": "Breakers", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "collapsed": false + }, + { + "id": 8, + "title": "Tripped for breakers", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum({__name__=~\"elasticsearch_breakers_.+_tripped\", cluster=\"$cluster\", node_host=~\"$node_host\"}) by (node_host)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Estimated size in bytes of breaker", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "{__name__=~\"elasticsearch_breakers_.+_size_in_bytes\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{__name__}} {{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Shards", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "collapsed": false + }, + { + "id": 11, + "title": "Active shards", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_active_shards{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 12, + "title": "Active primary shards", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_active_primary_shards{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 13, + "title": "Initializing shards", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_initializing_shards{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 14, + "title": "Relocating shards", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_relocating_shards{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 15, + "title": "Delayed Unassigned shards", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_delayed_unassigned_shards{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 16, + "title": "Unassigned shards", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(elasticsearch_cluster_health_unassigned_shards{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 17, + "title": "JVM", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "collapsed": false + }, + { + "id": 18, + "title": "GC counts / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_jvm_gc_collectors_old_collection_count{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "old gc {{node_host}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_jvm_gc_collectors_young_collection_count{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "young gc {{node_host}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 19, + "title": "GC time in millis", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_jvm_gc_collectors_old_collection_time_in_millis{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "old gc {{node_host}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_jvm_gc_collectors_young_collection_time_in_millis{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "young gc {{node_host}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 20, + "title": "Yong Used(Bytes)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "{__name__=~\"elasticsearch_jvm_mem_pools_young_used_in_bytes\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{__name__}} {{node_name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 21, + "title": "Old Used(Bytes)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "{__name__=~\"elasticsearch_jvm_mem_pools_old_used_in_bytes\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{__name__}} {{node_name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 22, + "title": "Committed Bytes", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "{__name__=~\"elasticsearch_jvm_mem_.+_committed_in_bytes\", cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{__name__}} {{node_name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 23, + "title": "Translog", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "collapsed": false + }, + { + "id": 24, + "title": "Total translog operations", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 22 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_translog_operations{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 25, + "title": "Total translog size in bytes", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 22 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_translog_size_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 26, + "title": "Disk and Network", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "collapsed": false + }, + { + "id": 27, + "title": "Disk usage %", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 27 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "1-(elasticsearch_fs_total_available_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}/elasticsearch_fs_total_total_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"})", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 28, + "title": "Network usage", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 27 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_transport_tx_size_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}: sent", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "-irate(elasticsearch_transport_rx_size_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}: received", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 29, + "title": "Documents", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "collapsed": false + }, + { + "id": 30, + "title": "Documents count on node", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "elasticsearch_indices_docs_count{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 31, + "title": "Documents indexed rate", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_indexing_index_total{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 32, + "title": "Documents deleted rate", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 36 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_docs_deleted{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 33, + "title": "Documents merged rate", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 36 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(elasticsearch_indices_merges_total_docs{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 34, + "title": "Documents merged bytes", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 36 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_merges_total_size_in_bytes{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 35, + "title": "Times", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "collapsed": false + }, + { + "id": 36, + "title": "Query time(Unit: ms)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 41 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_search_query_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 37, + "title": "Indexing time(Unit: ms)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 41 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_indexing_index_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 38, + "title": "Merging time(Unit: ms)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 45 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_merges_total_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 39, + "title": "Indexing throttle time(Unit: ms)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 45 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(elasticsearch_indices_indexing_throttle_time_in_millis{cluster=\"$cluster\",node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 40, + "title": "Thread Pool", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 49 + }, + "collapsed": false + }, + { + "id": 41, + "title": "Thread Pool operations rejected", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 50 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate\n(label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_rejected\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_rejected\")[5m:])", + "legendFormat": "{{node_host}}: {{type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 42, + "title": "Thread Pool threads active", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 50 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_active\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_active\")", + "legendFormat": "{{node_host}}: {{type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 43, + "title": "Thread Pool threads queued", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 50 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_queue\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_queue\")", + "legendFormat": "{{node_host}}: {{type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 44, + "title": "Thread Pool operations completed", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 50 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate\n(label_replace({__name__=~\"elasticsearch_thread_pool_(.*)_completed\", cluster=\"$cluster\", node_host=~\"$node_host\"}, \"type\", \"$1\", \"__name__\", \"elasticsearch_thread_pool_(.*)_completed\")[5m:])", + "legendFormat": "{{node_host}}: {{type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 45, + "title": "Caches", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 54 + }, + "collapsed": false + }, + { + "id": 46, + "title": "Field data memory size", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 55 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "elasticsearch_indices_fielddata_memory_size_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 47, + "title": "Field data evictions", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 55 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(elasticsearch_indices_fielddata_evictions{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 48, + "title": "Query cache size", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 55 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "elasticsearch_indices_query_cache_memory_size_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 49, + "title": "Query cache evictions", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 55 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(elasticsearch_indices_query_cache_evictions{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 50, + "title": "Request cache evictions", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 55 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(elasticsearch_indices_request_cache_evictions{cluster=\"$cluster\", node_host=~\"$node_host\"}[5m])", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 51, + "title": "Segments", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 59 + }, + "collapsed": false + }, + { + "id": 52, + "title": "Count of index segments", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 60 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "elasticsearch_indices_segments_count{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 53, + "title": "Current memory size of segments in bytes", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 60 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "elasticsearch_indices_segments_memory_in_bytes{cluster=\"$cluster\", node_host=~\"$node_host\"}", + "legendFormat": "{{node_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(elasticsearch_up, cluster)", + "query": { + "query": "label_values(elasticsearch_up, cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "node_host", + "multi": true, + "name": "node_host", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(elasticsearch_jvm_uptime_in_millis{cluster=\"$cluster\"}, node_host)", + "query": { + "query": "label_values(elasticsearch_jvm_uptime_in_millis{cluster=\"$cluster\"}, node_host)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "ElasticSearch by Categraf", + "uid": "categraf-elasticsearch-dashboard-c96daae", + "version": 1, + "weekStart": "" +} diff --git a/inputs/haproxy/dashboard_grafana.json b/inputs/haproxy/dashboard_grafana.json new file mode 100644 index 00000000..02a4315b --- /dev/null +++ b/inputs/haproxy/dashboard_grafana.json @@ -0,0 +1,861 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Stats API UP?", + "type": "stat", + "gridPos": { + "h": 6, + "w": 2, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "haproxy_up", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Backends UP?", + "type": "table", + "gridPos": { + "h": 6, + "w": 5, + "x": 2, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "haproxy_backend_up{ident=\"$ident\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 3, + "title": "Servers UP?", + "type": "table", + "gridPos": { + "h": 6, + "w": 5, + "x": 7, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "haproxy_server_up{ident=\"$ident\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 4, + "title": "Active sessions", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(haproxy_frontend_current_sessions{frontend=~\"$frontend\",ident=\"$ident\"}) by (frontend)", + "legendFormat": "Front-{{frontend}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(haproxy_backend_current_sessions{backend=~\"$backend\",ident=\"$ident\"}) by (backend)", + "legendFormat": "Back-{{backend}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Frontend responses by code", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 6 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_frontend_http_responses_total{frontend=~\"$frontend\",code=~\"$code\",ident=\"$ident\"}[5m])) by (code)", + "legendFormat": "{{ code }}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "Backend responses by code", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 6 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_backend_http_responses_total{backend=~\"$backend\",code=~\"$code\",ident=\"$ident\"}[5m])) by (code)", + "legendFormat": "{{ code }}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Incoming / Outgoing bits (Frontend)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_frontend_bytes_in_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])*8) by (frontend)", + "legendFormat": "IN {{frontend}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "-sum(rate(haproxy_frontend_bytes_out_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])*8) by (frontend)", + "legendFormat": "OUT {{frontend}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "Incoming / Outgoing bits(Backend)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_backend_bytes_in_total{backend=~\"$backend\",ident=\"$ident\"}[5m])*8) by (backend)", + "legendFormat": "IN {{backend}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "-sum(rate(haproxy_backend_bytes_out_total{backend=~\"$backend\",ident=\"$ident\"}[5m])*8) by (backend)", + "legendFormat": "OUT {{backend}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Frontend Requests", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_frontend_http_requests_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])) by (frontend)", + "legendFormat": "Front requests - {{frontend}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_frontend_request_errors_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])) by (frontend)", + "legendFormat": "Front requests errors - {{frontend}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_frontend_requests_denied_total{frontend=~\"$frontend\",ident=\"$ident\"}[5m])) by (frontend)", + "legendFormat": "Front request denied - {{frontend}}", + "range": true, + "refId": "F" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Backend Requests", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_backend_redispatch_warnings_total{backend=~\"$backend\",ident=\"$ident\"}[5m])) by (backend)", + "legendFormat": "Back redispatch warnings + {{backend}}", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_backend_retry_warnings_total{backend=~\"$backend\",ident=\"$ident\"}[5m])) by (backend)", + "legendFormat": "Back retry warnings + {{backend}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_backend_response_errors_total{backend=~\"$backend\",ident=\"$ident\"}[5m])) by (backend)", + "legendFormat": "Back response errors + {{backend}}", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(haproxy_backend_current_queue{backend=~\"$backend\",ident=\"$host\"}) by (backend)", + "legendFormat": "Back queued requests + {{backend}}", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(haproxy_backend_connection_errors_total{backend=~\"$backend\", ident=\"$ident\"}[5m])) by (backend)", + "legendFormat": "Back conn errors + {{backend}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "ident", + "multi": false, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(haproxy_up,ident)", + "query": { + "query": "label_values(haproxy_up,ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "frontend", + "multi": true, + "name": "frontend", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(haproxy_frontend_bytes_in_total{ident=\"$ident\"}, frontend)", + "query": { + "query": "label_values(haproxy_frontend_bytes_in_total{ident=\"$ident\"}, frontend)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "backend", + "multi": true, + "name": "backend", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(haproxy_backend_bytes_in_total{ident=\"$ident\"}, backend)", + "query": { + "query": "label_values(haproxy_backend_bytes_in_total{ident=\"$ident\"}, backend)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "server", + "multi": true, + "name": "server", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(haproxy_server_bytes_in_total{ident=\"$ident\", backend=~\"$backend\"}, server)", + "query": { + "query": "label_values(haproxy_server_bytes_in_total{ident=\"$ident\", backend=~\"$backend\"}, server)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "code", + "multi": true, + "name": "code", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(haproxy_server_http_responses_total{ident=\"$ident\",backend=~\"$backend\", server=~\"$server\"}, code)", + "query": { + "query": "label_values(haproxy_server_http_responses_total{ident=\"$ident\",backend=~\"$backend\", server=~\"$server\"}, code)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "HAProxy By Categraf", + "uid": "categraf-haproxy-dashboard-e83add9e", + "version": 1, + "weekStart": "" +} diff --git a/inputs/http_response/dashboard_grafana.json b/inputs/http_response/dashboard_grafana.json new file mode 100644 index 00000000..b75c5d7e --- /dev/null +++ b/inputs/http_response/dashboard_grafana.json @@ -0,0 +1,163 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Default chart group", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + } + }, + { + "id": 2, + "title": "URL Details", + "type": "table", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(http_response_result_code) by (target)", + "legendFormat": "UP?", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(http_response_response_code) by (target)", + "legendFormat": "status code", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(http_response_response_time) by (target)", + "legendFormat": "latency(s)", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(http_response_cert_expire_timestamp) by (target) - time()", + "legendFormat": "cert expire", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "HTTP探测", + "uid": "categraf-http-response-dashboard-7045335", + "version": 1, + "weekStart": "" +} diff --git a/inputs/ipmi/ipmi_dash_grafana.json b/inputs/ipmi/ipmi_dash_grafana.json new file mode 100644 index 00000000..5d45ad1a --- /dev/null +++ b/inputs/ipmi/ipmi_dash_grafana.json @@ -0,0 +1,789 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Power Status", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_chassis_power_state{target=\"$instance\"}", + "legendFormat": "{{target}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Machine Info", + "type": "table", + "gridPos": { + "h": 4, + "w": 12, + "x": 4, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_bmc_info{target=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 3, + "title": "Fan Speed State", + "type": "table", + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_fan_speed_state{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 4, + "title": "Fan speed in rotations per minute", + "type": "gauge", + "gridPos": { + "h": 5, + "w": 16, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_fan_speed_rpm{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 5, + "title": "Power Consumption watts", + "type": "timeseries", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_dcmi_power_consumption_watts{target=\"$instance\"}", + "legendFormat": "{{target}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "Power State", + "type": "table", + "gridPos": { + "h": 8, + "w": 4, + "x": 12, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_power_state{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 7, + "title": "Power reading in Watts", + "type": "gauge", + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_power_watts{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 8, + "title": "IPMI Sensors State", + "type": "table", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_sensor_state{target=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 9, + "title": "Temperature State", + "type": "table", + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_temperature_state{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 10, + "title": "Temperatures", + "type": "gauge", + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_temperature_celsius{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 11, + "title": "Reported state of a voltage sensor", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 25 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_voltage_state{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Voltage reading in Volts", + "type": "gauge", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_voltage_volts{target=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "Categraf", + "latest" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(ipmi_bmc_info, target)", + "query": { + "query": "label_values(ipmi_bmc_info, target)", + "refId": "StandardVariableQuery" + }, + "regex": "/.*/", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "IPMI", + "uid": "categraf-ipmi-ipmi-dash-20bf752e", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kafka/dashboard-by-topic_grafana.json b/inputs/kafka/dashboard-by-topic_grafana.json new file mode 100644 index 00000000..f9713484 --- /dev/null +++ b/inputs/kafka/dashboard-by-topic_grafana.json @@ -0,0 +1,490 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "current consume lag by partition (c)", + "type": "table", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_topic_partition_current_offset{cluster=\"$cluster\", topic=~\"$topic\"}) by (topic, partition) - sum(kafka_consumergroup_current_offset{cluster=\"$cluster\", topic=~\"$topic\", consumergroup=\"$consumergroup\"}) by (topic, partition)", + "legendFormat": "lag", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 2, + "title": "message consume lag total (c)", + "type": "stat", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_topic_partition_current_offset{cluster=\"$cluster\", topic=~\"$topic\"}) by (topic) - sum(kafka_consumergroup_current_offset_sum{cluster=\"$cluster\", topic=~\"$topic\", consumergroup=\"$consumergroup\"}) by (topic)", + "legendFormat": "lag", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 3, + "title": "message produce/consume rate (c/s)", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kafka_topic_partition_current_offset{cluster=\"$cluster\", topic=~\"$topic\"}[1m])) by (topic)", + "legendFormat": "produce rate", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kafka_consumergroup_current_offset_sum{cluster=\"$cluster\", topic=~\"$topic\", consumergroup=\"$consumergroup\"}[1m])) by (topic)", + "legendFormat": "consume rate", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "message produce rate by partition (c/s)", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kafka_topic_partition_current_offset{cluster=\"$cluster\", topic=~\"$topic\"})[1m]) by (topic, partition)", + "legendFormat": "{{ partition }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "message consume lag total (c)", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_topic_partition_current_offset{cluster=\"$cluster\", topic=~\"$topic\"}) by (topic) - sum(kafka_consumergroup_current_offset_sum{cluster=\"$cluster\", topic=~\"$topic\", consumergroup=\"$consumergroup\"}) by (topic)", + "legendFormat": "lag", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "message consume lag by partition (c)", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_topic_partition_current_offset{cluster=\"$cluster\", topic=~\"$topic\"}) by (topic, partition) - sum(kafka_consumergroup_current_offset{cluster=\"$cluster\", topic=~\"$topic\", consumergroup=\"$consumergroup\"}) by (topic, partition)", + "legendFormat": "{{ partition }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kafka_brokers, cluster)", + "query": { + "query": "label_values(kafka_brokers, cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "topic", + "multi": false, + "name": "topic", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kafka_topic_partitions{cluster=\"$cluster\"}, topic)", + "query": { + "query": "label_values(kafka_topic_partitions{cluster=\"$cluster\"}, topic)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "consumergroup", + "multi": false, + "name": "consumergroup", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kafka_consumergroup_current_offset{cluster=\"$cluster\",topic=~\"$topic\"}, consumergroup)", + "query": { + "query": "label_values(kafka_consumergroup_current_offset{cluster=\"$cluster\",topic=~\"$topic\"}, consumergroup)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "kafka by topic", + "uid": "categraf-kafka-dashboard-by-topic-76801d", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kafka/dashboard-key-metrics_grafana.json b/inputs/kafka/dashboard-key-metrics_grafana.json new file mode 100644 index 00000000..b3bc7c8c --- /dev/null +++ b/inputs/kafka/dashboard-key-metrics_grafana.json @@ -0,0 +1,1127 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "JVM", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Uptime", + "type": "stat", + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "min(kafka_java_runtime_Uptime{cluster=\"$cluster\", ident=~\"$ident\"})/1000", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "HeapMemoryUsage(Bytes)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 7, + "x": 5, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_java_memory_HeapMemoryUsage_used{cluster=\"$cluster\", ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "HeapMemoryUsage(%)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_java_memory_HeapMemoryUsage_used{cluster=\"$cluster\", ident=~\"$ident\"}/kafka_java_memory_HeapMemoryUsage_max{cluster=\"$cluster\", ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "GC Rate(G1 Young)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(kafka_java_garbage_collector_CollectionCount{cluster=\"$cluster\", ident=~\"$ident\", name=~\"G1 Young Generation\"}[1m])", + "legendFormat": "{{ident}} {{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "Threads Sum", + "type": "stat", + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_java_threading_ThreadCount{cluster=\"$cluster\", ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 7, + "title": "MemoryPoolUsage(Bytes)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 13, + "x": 5, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_java_memory_pool_Usage_used{cluster=\"$cluster\", ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "GC Rate(G1 Old)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(kafka_java_garbage_collector_CollectionCount{cluster=\"$cluster\", ident=~\"$ident\", name=~\"G1 Old Generation\"}[1m])", + "legendFormat": "{{ident}} {{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Full GC" + }, + { + "id": 9, + "title": "LastGC Use MS", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_java_last_garbage_collection_LastGcInfo_duration{cluster=\"$cluster\", ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "YoungGC Use MS/Second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(kafka_java_garbage_collector_CollectionTime{cluster=\"$cluster\", ident=~\"$ident\", name=\"G1 Young Generation\"}[1m])", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "FullGC Use MS/Second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(kafka_java_garbage_collector_CollectionTime{cluster=\"$cluster\", ident=~\"$ident\", name=\"G1 Old Generation\"}[1m])", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Kafka", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "collapsed": false + }, + { + "id": 13, + "title": "活跃控制器数量", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_controller_ActiveControllerCount_Value{cluster=\"$cluster\", ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 14, + "title": "非同步分区数量", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_cluster_UnderReplicatedPartitions{cluster=\"$cluster\", ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 15, + "title": "离线分区数量", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_controller_OfflinePartitionsCount_Value{cluster=\"$cluster\", ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 16, + "title": "离线日志目录数量", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_logmanager_OfflineLogDirectoryCount{cluster=\"$cluster\", ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 17, + "title": "Panel 17", + "type": "table", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_replica_manager_PartitionCount_Value{cluster=\"$cluster\", ident=~\"$ident\"}) by (ident)", + "legendFormat": "分区数量", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_replica_manager_LeaderCount_Value{cluster=\"$cluster\", ident=~\"$ident\"}) by (ident)", + "legendFormat": "主分区数量", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(kafka_topic_BytesInPerSec_Count{cluster=\"$cluster\", ident=~\"$ident\"}[5m])) by (ident)", + "legendFormat": "入方向字节/秒", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(kafka_topic_BytesOutPerSec_Count{cluster=\"$cluster\", ident=~\"$ident\"}[5m])) by (ident)", + "legendFormat": "出方向字节/秒", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(kafka_topics_MessagesInPerSec_Count{cluster=\"$cluster\", ident=~\"$ident\"}[5m])) by (ident)", + "legendFormat": "入消息/秒", + "range": true, + "refId": "E" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 18, + "title": "Topic数据预计还需消费多久", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 21 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_consumer_lag_millis{cluster=\"$cluster\", ident=~\"$ident\"}) by (consumergroup, topic, partition)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kafka_java_runtime_Uptime, cluster)", + "query": { + "query": "label_values(kafka_java_runtime_Uptime, cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "ident", + "multi": true, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kafka_java_runtime_Uptime{cluster=\"$cluster\"}, ident)", + "query": { + "query": "label_values(kafka_java_runtime_Uptime{cluster=\"$cluster\"}, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0, + "allValue": ".*" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kafka Key Metrics", + "uid": "categraf-kafka-dashboard-key-metrics-d98", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kafka/dashboard_grafana.json b/inputs/kafka/dashboard_grafana.json new file mode 100644 index 00000000..e2cf43a0 --- /dev/null +++ b/inputs/kafka/dashboard_grafana.json @@ -0,0 +1,652 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "overview", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "brokers", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_brokers{cluster=\"$cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 3, + "title": "topics", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count by (topic) (kafka_topic_partitions{cluster=\"$cluster\"}))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 4, + "title": "partitions", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_topic_partitions{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 5, + "title": "Replicas", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_topic_partition_replicas{cluster=\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "throughput", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "collapsed": false + }, + { + "id": 7, + "title": "Messages produced per second", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kafka_topic_partition_current_offset{cluster=\"$cluster\"}[1m])) by (topic)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "Messages consumed per second", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kafka_consumergroup_current_offset{cluster=\"$cluster\"}[1m])) by (topic)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Latency by Consumer Group", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kafka_consumer_lag_millis{cluster=\"$cluster\"}) by (consumergroup, topic)", + "legendFormat": "{{consumergroup}} (topic: {{topic}})", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "patition/replicate", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "collapsed": false + }, + { + "id": 11, + "title": "Partitions per Topic", + "type": "table", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_topic_partitions{cluster=\"$cluster\"}", + "legendFormat": "{{topic}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 12, + "title": "Partitions Under Replicated", + "type": "table", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "kafka_topic_partition_under_replicated_partition{cluster=\"$cluster\"}", + "legendFormat": "{{topic}}-{{partition}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + }, + "description": "副本不同步预案\n1. Restart the Zookeeper leader.\n2. Restart the broker\\brokers that are not replicating some of the partitions." + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "Kafka", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kafka_brokers, cluster)", + "query": { + "query": "label_values(kafka_brokers, cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kafka - 模板", + "uid": "categraf-kafka-dashboard-a36f0360", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kube_proxy/dashboard-by-ident_grafana.json b/inputs/kube_proxy/dashboard-by-ident_grafana.json new file mode 100644 index 00000000..90dbd28f --- /dev/null +++ b/inputs/kube_proxy/dashboard-by-ident_grafana.json @@ -0,0 +1,759 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Up", + "type": "stat", + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(up{job=\"kube-proxy\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Rules Sync Rate", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 10, + "x": 4, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{job=\"kube-proxy\", ident=~\"$ident\"}[5m]))", + "legendFormat": "rate", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 3, + "title": "Rule Sync Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 10, + "x": 14, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{job=\"kube-proxy\", ident=~\"$ident\"}[5m]))", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "Network Programming Rate", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{job=\"kube-proxy\", ident=~\"$ident\"}[5m]))", + "legendFormat": "rate", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Network Programming Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\", ident=~\"$ident\"}[5m])) by (ident, le))", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "Kube API Request Rate", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"2..\"}[5m]))", + "legendFormat": "2xx", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"3..\"}[5m]))", + "legendFormat": "3xx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"4..\"}[5m]))", + "legendFormat": "4xx", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"5..\"}[5m]))", + "legendFormat": "5xx", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Post Request Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-proxy\",ident=~\"$ident\",verb=\"POST\"}[5m])) by (verb, url, le))", + "legendFormat": "{{verb}} {{url}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "Get Request Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 15 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-proxy\", ident=~\"$ident\", verb=\"GET\"}[5m])) by (verb, url, le))", + "legendFormat": "{{verb}} {{url}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Memory", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "process_resident_memory_bytes{job=\"kube-proxy\",ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "CPU usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(process_cpu_seconds_total{job=\"kube-proxy\",ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "Goroutines", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "go_goroutines{job=\"kube-proxy\",ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "ident", + "multi": true, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kubeproxy_sync_proxy_rules_iptables_restore_failures_total, ident)", + "query": { + "query": "label_values(kubeproxy_sync_proxy_rules_iptables_restore_failures_total, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0, + "allValue": ".*" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kubernetes / Proxy (dashboard-by-ident)", + "uid": "categraf-kube-proxy-dashboard-by-ident-4", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kube_proxy/dashboard_grafana.json b/inputs/kube_proxy/dashboard_grafana.json new file mode 100644 index 00000000..35b2b11b --- /dev/null +++ b/inputs/kube_proxy/dashboard_grafana.json @@ -0,0 +1,759 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Up", + "type": "stat", + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(up{job=\"kube-proxy\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Rules Sync Rate", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 10, + "x": 4, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{job=\"kube-proxy\", ident=~\"$ident\"}[5m]))", + "legendFormat": "rate", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 3, + "title": "Rule Sync Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 10, + "x": 14, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{job=\"kube-proxy\", ident=~\"$ident\"}[5m]))", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "Network Programming Rate", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(kubeproxy_network_programming_duration_seconds_count{job=\"kube-proxy\", ident=~\"$ident\"}[5m]))", + "legendFormat": "rate", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Network Programming Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\", ident=~\"$ident\"}[5m])) by (ident, le))", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "Kube API Request Rate", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"2..\"}[5m]))", + "legendFormat": "2xx", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"3..\"}[5m]))", + "legendFormat": "3xx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"4..\"}[5m]))", + "legendFormat": "4xx", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", ident=~\"$ident\",code=~\"5..\"}[5m]))", + "legendFormat": "5xx", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Post Request Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-proxy\",ident=~\"$ident\",verb=\"POST\"}[5m])) by (verb, url, le))", + "legendFormat": "{{verb}} {{url}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "Get Request Latency 99th Quantile", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 15 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{job=\"kube-proxy\", ident=~\"$ident\", verb=\"GET\"}[5m])) by (verb, url, le))", + "legendFormat": "{{verb}} {{url}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Memory", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "process_resident_memory_bytes{job=\"kube-proxy\",ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "CPU usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(process_cpu_seconds_total{job=\"kube-proxy\",ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "Goroutines", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "go_goroutines{job=\"kube-proxy\",ident=~\"$ident\"}", + "legendFormat": "{{ident}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "ident", + "multi": true, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kubeproxy_sync_proxy_rules_iptables_restore_failures_total, ident)", + "query": { + "query": "label_values(kubeproxy_sync_proxy_rules_iptables_restore_failures_total, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0, + "allValue": ".*" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kubernetes / Proxy (dashboard)", + "uid": "categraf-kube-proxy-dashboard-a4fdac78", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kube_state_metrics/dashboard_grafana.json b/inputs/kube_state_metrics/dashboard_grafana.json new file mode 100644 index 00000000..1857cc9e --- /dev/null +++ b/inputs/kube_state_metrics/dashboard_grafana.json @@ -0,0 +1,2018 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Node", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Total Node", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_condition{cluster=~\"$cluster\", condition=\"Ready\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Not Ready Node", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_condition{cluster=~\"$cluster\",condition=\"Ready\", status!=\"true\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 4, + "title": "有磁盘压力", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_condition{cluster=~\"$cluster\",condition=\"DiskPressure\", status=\"true\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "有内存压力", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_condition{cluster=~\"$cluster\",condition=\"MemoryPressure\", status=\"true\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "有网络压力", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_condition{cluster=~\"$cluster\",condition=\"NetworkUnavailable\", status=\"true\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 7, + "title": "有PID压力", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_condition{cluster=~\"$cluster\",condition=\"PIDPressure\", status=\"true\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 8, + "title": "集群容量:CPU Cores", + "type": "stat", + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_capacity{cluster=~\"$cluster\", resource=\"cpu\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 9, + "title": "集群容量:Memory", + "type": "stat", + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_capacity{cluster=~\"$cluster\", resource=\"memory\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 10, + "title": "集群容量:Ephemeral Storage", + "type": "stat", + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_node_status_capacity{cluster=~\"$cluster\", resource=\"ephemeral_storage\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 11, + "title": "Daemonset", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "collapsed": false + }, + { + "id": 12, + "title": "Desired Number Scheduled", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_daemonset_status_desired_number_scheduled{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 13, + "title": "Current Number Scheduled", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_daemonset_status_current_number_scheduled{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 14, + "title": "Ready", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_daemonset_status_number_ready{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 15, + "title": "Available", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_daemonset_status_number_available{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 16, + "title": "Unavailable", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_daemonset_status_number_unavailable{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 17, + "title": "Misscheduled", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_daemonset_status_number_misscheduled{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 18, + "title": "Deployment", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "collapsed": false + }, + { + "id": 19, + "title": "Replicas", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_deployment_status_replicas{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 20, + "title": "Replicas Available", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_deployment_status_replicas_available{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 21, + "title": "Replicas Ready", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_deployment_status_replicas_ready{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 22, + "title": "Unavailable", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_deployment_status_replicas_unavailable{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 23, + "title": "Statefulset", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "collapsed": false + }, + { + "id": 24, + "title": "Replicas", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_statefulset_status_replicas{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 25, + "title": "Replicas Available", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_statefulset_status_replicas_available{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 26, + "title": "Replicas Current", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_statefulset_status_replicas_current{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 27, + "title": "Replicas Ready", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_statefulset_status_replicas_ready{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 28, + "title": "Pod", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "collapsed": false + }, + { + "id": 29, + "title": "Running Pods", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_status_phase{cluster=~\"$cluster\", phase=\"Running\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 30, + "title": "Pending Pods", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_status_phase{cluster=~\"$cluster\", phase=\"Pending\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 31, + "title": "Failed | Unknown Pods", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_status_phase{cluster=~\"$cluster\", phase=~\"Failed|Unknown\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 32, + "title": "Restarts in last 5min", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(kube_pod_container_status_restarts_total{cluster=~\"$cluster\"}[5m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 33, + "title": "Job", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "collapsed": false + }, + { + "id": 34, + "title": "Complete", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 24 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_job_complete{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 35, + "title": "Active", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 24 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_job_status_active{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 36, + "title": "Succeeded", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 24 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_job_status_succeeded{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 37, + "title": "Failed", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 24 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_job_status_failed{cluster=~\"$cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "kube-state-metrics" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "cluster", + "multi": true, + "name": "cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info, cluster)", + "query": { + "query": "label_values(kube_node_info, cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kube state", + "uid": "categraf-kube-state-metrics-dashboard-44", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kubelet/dashboard-by-ident_grafana.json b/inputs/kubelet/dashboard-by-ident_grafana.json new file mode 100644 index 00000000..d63ae645 --- /dev/null +++ b/inputs/kubelet/dashboard-by-ident_grafana.json @@ -0,0 +1,757 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Kubelet UP", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(up{job=\"kubelet\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Running Pods", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kubelet_running_pods{ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Running Containers", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kubelet_running_containers{ident=~\"$ident\", container_state=\"running\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 4, + "title": "Desired Volumes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(volume_manager_total_volumes{ident=~\"$ident\", state=\"desired_state_of_world\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "Actual Volumes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(volume_manager_total_volumes{ident=~\"$ident\", state=\"actual_state_of_world\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "OP Errors in 5min", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(kubelet_runtime_operations_errors_total{ident=~\"$ident\"}[5m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 7, + "title": "Operations", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "collapsed": false + }, + { + "id": 8, + "title": "Operations in 5min", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_runtime_operations_total{ident=~\"$ident\"}[5m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Operation Errors in 5min", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_runtime_operations_errors_total{ident=~\"$ident\"}[5m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Average Operation duration in 1 hour (Unit: Second)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_runtime_operations_duration_seconds_sum{ident=~\"$ident\"}[1h])/increase(kubelet_runtime_operations_duration_seconds_count{ident=~\"$ident\"}[1h])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "PLEG relist", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "collapsed": false + }, + { + "id": 12, + "title": "relist rate", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(kubelet_pleg_relist_duration_seconds_count{ident=~\"$ident\"}[1h])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 13, + "title": "relist duration (Unit: Second)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_pleg_relist_duration_seconds_sum{ident=~\"$ident\"}[1h])/increase(kubelet_pleg_relist_duration_seconds_count{ident=~\"$ident\"}[1h])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "ident", + "multi": true, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kubelet_running_pods, ident)", + "query": { + "query": "label_values(kubelet_running_pods, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kubelet metrics by ident (dashboard-by-ident)", + "uid": "categraf-kubelet-dashboard-by-ident-feff", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kubelet/dashboard_grafana.json b/inputs/kubelet/dashboard_grafana.json new file mode 100644 index 00000000..60aa83a0 --- /dev/null +++ b/inputs/kubelet/dashboard_grafana.json @@ -0,0 +1,757 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Kubelet UP", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(up{job=\"kubelet\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Running Pods", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kubelet_running_pods{ident=~\"$ident\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Running Containers", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kubelet_running_containers{ident=~\"$ident\", container_state=\"running\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 4, + "title": "Desired Volumes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(volume_manager_total_volumes{ident=~\"$ident\", state=\"desired_state_of_world\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "Actual Volumes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(volume_manager_total_volumes{ident=~\"$ident\", state=\"actual_state_of_world\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "OP Errors in 5min", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(kubelet_runtime_operations_errors_total{ident=~\"$ident\"}[5m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 7, + "title": "Operations", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "collapsed": false + }, + { + "id": 8, + "title": "Operations in 5min", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_runtime_operations_total{ident=~\"$ident\"}[5m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Operation Errors in 5min", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_runtime_operations_errors_total{ident=~\"$ident\"}[5m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Average Operation duration in 1 hour (Unit: Second)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_runtime_operations_duration_seconds_sum{ident=~\"$ident\"}[1h])/increase(kubelet_runtime_operations_duration_seconds_count{ident=~\"$ident\"}[1h])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "PLEG relist", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "collapsed": false + }, + { + "id": 12, + "title": "relist rate", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(kubelet_pleg_relist_duration_seconds_count{ident=~\"$ident\"}[1h])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 13, + "title": "relist duration (Unit: Second)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(kubelet_pleg_relist_duration_seconds_sum{ident=~\"$ident\"}[1h])/increase(kubelet_pleg_relist_duration_seconds_count{ident=~\"$ident\"}[1h])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "ident", + "multi": true, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kubelet_running_pods, ident)", + "query": { + "query": "label_values(kubelet_running_pods, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Kubelet metrics by ident (dashboard)", + "uid": "categraf-kubelet-dashboard-f1baae21", + "version": 1, + "weekStart": "" +} diff --git a/inputs/kubernetes/kube_resources_dash_grafana.json b/inputs/kubernetes/kube_resources_dash_grafana.json new file mode 100644 index 00000000..3080e1a8 --- /dev/null +++ b/inputs/kubernetes/kube_resources_dash_grafana.json @@ -0,0 +1,1090 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "集群监控", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "集群内存空闲率(%)", + "type": "stat", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(1-sum(kubernetes_pod_container_memory_usage_bytes)/ on(pod,container) sum(kube_pod_container_resource_requests_memory_bytes and on(pod,container) kubernetes_pod_container_memory_usage_bytes))*100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "decimals": 2, + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 3, + "title": "集群内存空闲量", + "type": "stat", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests_memory_bytes and on(pod,container) kubernetes_pod_container_memory_usage_bytes) - on(pod,container) \nsum( kubernetes_pod_container_memory_usage_bytes)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "decimals": 2, + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 4, + "title": "集群cpu空闲率(%)", + "type": "stat", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(1-sum(kubernetes_pod_container_cpu_usage_nanocores/1000000000)/ on(pod,container) sum(kube_pod_container_resource_requests_cpu_cores and on(pod,container) kubernetes_pod_container_cpu_usage_nanocores ))*100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "集群cpu空闲量", + "type": "stat", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests_cpu_cores and on(pod,container) kubernetes_pod_container_cpu_usage_nanocores )- on(pod,container) \n sum(kubernetes_pod_container_cpu_usage_nanocores /1000000000)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "top 10 项目内存空闲情况", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(10,sum (kube_pod_container_resource_requests_memory_bytes and on (pod,container,namespace) kubernetes_pod_container_memory_usage_bytes) by (namespace) - on(pod,container,namespace) sum(kubernetes_pod_container_memory_usage_bytes ) by (namespace))", + "legendFormat": "{{namespace}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "top 10 项目cpu空闲情况", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(10,sum (kube_pod_container_resource_requests_cpu_cores and on (pod,container,namespace) kubernetes_pod_container_cpu_usage_nanocores) by (namespace) - on(pod,container,namespace) sum(kubernetes_pod_container_cpu_usage_nanocores/1000000000 ) by (namespace))", + "legendFormat": "{{namespace}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "项目监控", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "collapsed": false + }, + { + "id": 9, + "title": "项目内存空闲率(%)", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(1-sum(kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"})/ on(pod,container) sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"} and on(pod,container) kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"}))*100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "decimals": 2, + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 10, + "title": "项目内存空闲量", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"} and on(pod,container) kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"}) - on(pod,container) \nsum( kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "decimals": 2, + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 11, + "title": "项目内存使用量", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": " sum(kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"})", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "decimals": 2, + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 12, + "title": "项目cpu空闲率(%)", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(1-sum(kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"}/1000000000)/ on(pod,container) sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\"} and on(pod,container) kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"} ))*100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 13, + "title": "项目cpu空闲量", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\"} and on(pod,container) kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"} )- on(pod,container) \n sum(kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"}/1000000000)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 14, + "title": "项目cpu使用量", + "type": "stat", + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 12 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"}/1000000000)\n ", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 15, + "title": "项目内存空闲率(%)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(1-sum(kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"})/ on(pod,container) sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"} and on(pod,container) kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"}))*100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 16, + "title": "项目cpu空闲率(%)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(1-sum(kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"}/1000000000)/ on(pod,container) sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\"} and on(pod,container) kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"} ))*100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 17, + "title": "top 10 pod内存空闲情况", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(10,(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"} and on (pod,container) kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"} ) - on(pod,container) kubernetes_pod_container_memory_usage_bytes{namespace=\"$namespace\"} )", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 18, + "title": "top 10 pod cpu空闲情况", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(10, (kube_pod_container_resource_requests_cpu_cores{namespace=\"$namespace\"} and on (pod,container) kubernetes_pod_container_cpu_usage_nanocores{namespace=\"$namespace\"} ) - on(pod,container) kubernetes_pod_container_cpu_usage_nanocores/1000000000 )", + "legendFormat": "{{pod}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "k8s" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "namespace", + "multi": false, + "name": "namespace", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kubernetes_pod_container_cpu_usage_nanocores,namespace)", + "query": { + "query": "label_values(kubernetes_pod_container_cpu_usage_nanocores,namespace)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "k8s_cluster_resource", + "uid": "categraf-kubernetes-kube-resources-dash", + "version": 1, + "weekStart": "" +} diff --git a/inputs/mongodb/dashboard_grafana.json b/inputs/mongodb/dashboard_grafana.json new file mode 100644 index 00000000..98704332 --- /dev/null +++ b/inputs/mongodb/dashboard_grafana.json @@ -0,0 +1,1404 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Basic Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Up", + "type": "stat", + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_up{cluster=\"$cluster\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "description": "实例数" + }, + { + "id": 3, + "title": "Uptime", + "type": "stat", + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_uptime{cluster=\"$cluster\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "description": "启用时长" + }, + { + "id": 4, + "title": "Memory", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_mem_resident{cluster='$cluster', cl_role=\"mongos\"} * 1024 * 1024", + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "内存占用(MiB)" + }, + { + "id": 5, + "title": "Page Faults", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_extra_info_page_faults{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}[5m])", + "legendFormat": "page faults", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "页缺失中断次数 Page faults indicate that requests are processed from disk either because an index is missing or there is not enough memory for the data set. Consider increasing memory or sharding out." + }, + { + "id": 6, + "title": "Network I/O", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_network_bytesOut{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}[5m])", + "legendFormat": "bytesOut", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_network_bytesIn{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}[5m])", + "legendFormat": "bytesIn", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "网络流量(byte)" + }, + { + "id": 7, + "title": "Connections", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_connections{cluster=\"$cluster\", conn_type=\"current\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "Connections", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "连接数 Keep in mind the hard limit on the maximum number of connections set by your distribution." + }, + { + "id": 8, + "title": "Assert Events", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_asserts{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}[5m])", + "legendFormat": "{{assert_type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "断言错误次数 Asserts are not important by themselves, but you can correlate spikes with other graphs." + }, + { + "id": 9, + "title": "Lock Queue", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_globalLock_currentQueue{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "{{count_type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "等待获取锁操作数量 Any number of queued operations for long periods of time is an indication of possible issues. Find the cause and fix it before requests get stuck in the queue." + }, + { + "id": 10, + "title": "Operation Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "collapsed": false + }, + { + "id": 11, + "title": "Command Operations", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_opcounters{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\", legacy_op_type!=\"command\"}[1m])", + "legendFormat": "{{legacy_op_type}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_opcountersRepl{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\", legacy_op_type!~\"(command|query|getmore)\"}[1m])", + "legendFormat": "repl_{{legacy_op_type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_metrics_ttl_deletedDocuments{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}[1m])", + "legendFormat": "ttl_delete", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "接收请求数 Shows how many times a command is executed per second on average during the selected interval." + }, + { + "id": 12, + "title": "Document Operations", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 16 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_metrics_document{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}[5m])", + "legendFormat": "{{doc_op_type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "文档操作数 When used in combination with 'Command Operations', this graph can help identify write amplification. For example, when one insert or update command actually inserts or updates hundreds, thousands, or even millions of documents." + }, + { + "id": 13, + "title": "Response Time", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_opLatencies_latency{cluster=~\"$cluster\", instance=~\"$instance\"}[1m]) / rate(mongodb_ss_opLatencies_ops{cluster=~\"$cluster\", instance=~\"$instance\"}[1m]) / 1000", + "legendFormat": "{{op_type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "操作详情耗时(毫秒)" + }, + { + "id": 14, + "title": "Query Efficiency", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(mongodb_ss_metrics_queryExecutor_scannedObjects{cluster=\"$cluster\"}[5m])) / sum(increase(mongodb_ss_metrics_document{cluster=\"$cluster\", doc_op_type=\"returned\"}[5m]))", + "legendFormat": "Document", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(mongodb_ss_metrics_queryExecutor_scanned{cluster=\"$cluster\"}[5m])) / sum(increase(mongodb_ss_metrics_document{cluster=\"$cluster\", doc_op_type=\"returned\"}[5m]))", + "legendFormat": "Index", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "查询效率" + }, + { + "id": 15, + "title": "Cursors", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_metrics_cursor_open{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "{{csr_type}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "游标数量 Helps identify why connections are increasing. Shows active cursors compared to cursors being automatically killed after 10 minutes due to an application not closing the connection." + }, + { + "id": 16, + "title": "Cache Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "collapsed": false + }, + { + "id": 17, + "title": "Cache Size", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 31 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_wt_cache_bytes_currently_in_the_cache{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "total", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_wt_cache_tracked_dirty_bytes_in_the_cache{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "dirty", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_wt_cache_tracked_bytes_belonging_to_internal_pages_in_the_cache{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "internal_pages", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_ss_wt_cache_tracked_bytes_belonging_to_leaf_pages_in_the_cache{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}", + "legendFormat": "leaf_pages", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "缓存大小(byte)" + }, + { + "id": 18, + "title": "Cache I/O", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 31 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_wt_cache_bytes_read_into_cache{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "legendFormat": "read", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_ss_wt_cache_bytes_written_from_cache{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "legendFormat": "written", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "bytes", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "写入或读取的缓存数据大小(byte)" + }, + { + "id": 19, + "title": "Cache Dirty Pages Rate", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 31 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "100 * sum(mongodb_ss_wt_cache_tracked_dirty_pages_in_the_cache{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"}) / sum(mongodb_ss_wt_cache_pages_currently_held_in_the_cache{cluster=\"$cluster\", cl_role=~\"$cl_role\", instance=~\"$instance\"})", + "legendFormat": "dirty rate", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "缓存脏页占比" + }, + { + "id": 20, + "title": "Cache Evicted Pages", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 31 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mongodb_mongod_wiredtiger_cache_evicted_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "legendFormat": "evicted pages", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "缓存剔除页数量" + }, + { + "id": 21, + "title": "ReplSet Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "collapsed": false + }, + { + "id": 22, + "title": "Replset Election", + "type": "stat", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 39 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "time() - mongodb_mongod_replset_member_election_date{cluster=\"$cluster\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "description": "副本集选主时间" + }, + { + "id": 23, + "title": "Replset Lag Seconds", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 39 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mongodb_mongod_replset_member_replication_lag{cluster=\"$cluster\"}", + "legendFormat": "{{set}} {{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "副本集成员主从同步延迟" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "Prometheus", + "MongoDB" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "cluster", + "multi": false, + "name": "cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mongodb_ss_uptime,cluster)", + "query": { + "query": "label_values(mongodb_ss_uptime,cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "cl_role", + "multi": false, + "name": "cl_role", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mongodb_ss_uptime{cluster=~\"$cluster\", ident=~\"n9ecollector\"}, cl_role)", + "query": { + "query": "label_values(mongodb_ss_uptime{cluster=~\"$cluster\", ident=~\"n9ecollector\"}, cl_role)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mongodb_ss_uptime{cluster=~\"$cluster\", ident=~\"n9ecollector\", cl_role=~\"$cl_role\"}, instance)", + "query": { + "query": "label_values(mongodb_ss_uptime{cluster=~\"$cluster\", ident=~\"n9ecollector\", cl_role=~\"$cl_role\"}, instance)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "MongoDB", + "uid": "categraf-mongodb-dashboard-7adfa7f6", + "version": 1, + "weekStart": "" +} diff --git a/inputs/mysql/dashboard-by-aws-rds_grafana.json b/inputs/mysql/dashboard-by-aws-rds_grafana.json new file mode 100644 index 00000000..6b2a6d0e --- /dev/null +++ b/inputs/mysql/dashboard-by-aws-rds_grafana.json @@ -0,0 +1,1090 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Common metrics", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "RDS CPU利用率(百分比)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_cpu_utilization_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds cpu 利用率平均值" + }, + { + "id": 3, + "title": "RDS 数据库连接数", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_database_connections_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 数据库连接平均值" + }, + { + "id": 4, + "title": "RDS 可用存储空间(MB/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 7 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_free_storage_space_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 可用存储空间平均值" + }, + { + "id": 5, + "title": "RDS 可用内存(MB)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 7 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_freeable_memory_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 可用内存平均值" + }, + { + "id": 6, + "title": "RDS 写入IOPS(次数/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_lvm_write_iops_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds lvm 写入 iops 平均值" + }, + { + "id": 7, + "title": "RDS 读取IOPS(次数/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_read_iops_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 读取 iops 平均值" + }, + { + "id": 8, + "title": "RDS 写入吞吐量(MB/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_write_throughput_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 写入吞吐量平均值" + }, + { + "id": 9, + "title": "RDS 读取吞吐量(MB/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_read_throughput_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 读取吞吐量平均值" + }, + { + "id": 10, + "title": "NetWork metrics", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "collapsed": false + }, + { + "id": 11, + "title": "RDS 网络接收吞吐量(MB/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_network_receive_throughput_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 网络接收吞吐量平均" + }, + { + "id": 12, + "title": "RDS 网络传输吞吐量(MB/秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_network_transmit_throughput_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 网络传输吞吐量平均值" + }, + { + "id": 13, + "title": "RDS 写入延迟(毫秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_write_latency_average{region=\"$region\",db_instance_identifier=\"$instance\"} * 1000", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 写入延迟平均值" + }, + { + "id": 14, + "title": "RDS 读取延迟(毫秒)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_read_latency_average{region=\"$region\",db_instance_identifier=\"$instance\"} * 1000", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 读取延迟平均值" + }, + { + "id": 15, + "title": "Additional metrics", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "collapsed": false + }, + { + "id": 16, + "title": "RDS 队列深度(数量)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 39 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_disk_queue_depth_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 磁盘队列深度平均值" + }, + { + "id": 17, + "title": "RDS 二进制日志磁盘使用情况 (MB)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 39 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_bin_log_disk_usage_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 二进制日志磁盘使用情况 (MB)" + }, + { + "id": 18, + "title": "RDS 交换分区使用情况(MB)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 45 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_swap_usage_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 交换分区使用平均值" + }, + { + "id": 19, + "title": "RDS 突发信用余额平均值(百分比)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 45 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "cloudwatch_aws_rds_burst_balance_average{region=\"$region\",db_instance_identifier=\"$instance\"}", + "legendFormat": "{{db_instance_identifier}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "max": 110, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 突发余额平均值" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "AWS", + "Cloudwatch", + "Telegraf" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "region", + "multi": false, + "name": "region", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(cloudwatch_aws_rds_cpu_utilization_average, region)", + "query": { + "query": "label_values(cloudwatch_aws_rds_cpu_utilization_average, region)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(cloudwatch_aws_rds_cpu_utilization_average{region=\"$region\"}, db_instance_identifier)", + "query": { + "query": "label_values(cloudwatch_aws_rds_cpu_utilization_average{region=\"$region\"}, db_instance_identifier)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "AWS RDS Telegraf", + "uid": "categraf-mysql-dashboard-by-aws-rds-b194", + "version": 1, + "weekStart": "" +} diff --git a/inputs/mysql/dashboard-by-ident_grafana.json b/inputs/mysql/dashboard-by-ident_grafana.json new file mode 100644 index 00000000..66ca1fa8 --- /dev/null +++ b/inputs/mysql/dashboard-by-ident_grafana.json @@ -0,0 +1,2094 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Basic Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "MySQL Uptime Days", + "type": "stat", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_uptime{ident=~\"$ident\"}/3600/24", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Current QPS", + "type": "stat", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_queries{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "description": "mysql_global_status_queries" + }, + { + "id": 4, + "title": "InnoDB Buffer Pool", + "type": "stat", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_variables_innodb_buffer_pool_size{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "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." + }, + { + "id": 5, + "title": "Table Locks Waited(5min)", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(mysql_global_status_table_locks_waited{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "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." + }, + { + "id": 6, + "title": "Slave Replication Lag", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_slave_status_seconds_behind_master{ident=~\"$ident\"} - mysql_slave_status_sql_delay{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Connections", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "collapsed": false + }, + { + "id": 8, + "title": "MySQL Connections", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_threads_connected{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Connections", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 9, + "title": "MySQL Connections Used Percent", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_threads_connected{ident=~\"$ident\"}/mysql_global_variables_max_connections{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 10, + "title": "MySQL Client Thread Running", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_threads_running{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Threads Running", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Threads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." + }, + { + "id": 11, + "title": "Max Used and Aborted Connections", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_max_used_connections{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Max Used Connections", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_aborted_connects{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Aborted Connections", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 12, + "title": "Query Performance", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "collapsed": false + }, + { + "id": 13, + "title": "MySQL Temporary Objects", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_created_tmp_tables{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Created Tmp Tables", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_created_tmp_disk_tables{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Created Tmp Disk Tables", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_created_tmp_files{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Created Tmp Files", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "MySQL Select Types", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_full_join{ ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Select Full Join", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_full_range_join{ ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Select Full Range Join", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_range{ ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Select Range", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_range_check{ ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Select Range Check", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_scan{ ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Select Scan", + "range": true, + "refId": "E" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 15, + "title": "MySQL Sorts", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_rows{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Sort Rows", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_range{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Sort Range", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_merge_passes{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Sort Merge Passes", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_scan{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Sort Scan", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + { + "id": 16, + "title": "MySQL Slow Queries", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_slow_queries{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Slow Queries", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 17, + "title": "Network", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "collapsed": false + }, + { + "id": 18, + "title": "MySQL Network Traffic", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_bytes_received{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Inbound", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_bytes_sent{ident=~\"$ident\"}[5m])", + "legendFormat": "{{ident}} {{address}} Outbound", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 19, + "title": "Commands, Handlers", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "collapsed": false + }, + { + "id": 20, + "title": "Top Command Counters", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(10, rate(mysql_global_status_commands_total{ident=~\"$ident\"}[5m])>0)", + "legendFormat": "{{ident}} {{address}} {{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 21, + "title": "Select per second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_commands_total{ident=~\"$ident\", command=\"select\"}[1m])", + "legendFormat": "{{ident}} {{address}} ", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 22, + "title": "Write(insert|update|delete) per second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_commands_total{ident=~\"$ident\", command=~\"insert|update|delete\"}[1m])", + "legendFormat": "{{ident}} {{address}} {{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 23, + "title": "TPS(commit|rollback)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_commands_total{ident=~\"$ident\", command=~\"commit|rollback\"}[10m])", + "legendFormat": "{{ident}} {{address}} {{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 24, + "title": "MySQL Handlers", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_handlers_total{ident=~\"$ident\", handler!~\"commit|rollback|savepoint.*|prepare\"}[5m])", + "legendFormat": "{{ident}} {{address}} {{handler}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 3, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 25, + "title": "MySQL Transaction Handlers", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_handlers_total{ident=~\"$ident\", handler=~\"commit|rollback|savepoint.*|prepare\"}[5m])", + "legendFormat": "{{ident}} {{address}} {{handler}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 26, + "title": "Open Files", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "collapsed": false + }, + { + "id": 27, + "title": "MySQL Open Files", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 37 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_variables_open_files_limit{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Open Files Limit", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_open_files{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Open Files", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 28, + "title": "Table Openings", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "collapsed": false + }, + { + "id": 29, + "title": "Table Open Cache Hit Ratio Mysql 5.6.6+", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 42 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_table_open_cache_hits{ident=~\"$ident\"}[5m])\n/\n(\nrate(mysql_global_status_table_open_cache_hits{ident=~\"$ident\"}[5m])\n+\nrate(mysql_global_status_table_open_cache_misses{ident=~\"$ident\"}[5m])\n)", + "legendFormat": "{{ident}} {{address}} Table Open Cache Hit Ratio", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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)." + }, + { + "id": 30, + "title": "MySQL Open Tables", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 42 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_open_tables{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Open Tables", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_variables_table_open_cache{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}} Table Open Cache", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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)." + }, + { + "id": 31, + "title": "InnoDB", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 46 + }, + "collapsed": false + }, + { + "id": 32, + "title": "Read requests / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 47 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_buffer_pool_read_requests{ident=~\"$ident\"}[1m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 33, + "title": "Reads from disk / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 47 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_buffer_pool_reads{ident=~\"$ident\"}[1m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 34, + "title": "Reads from memory percent", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 47 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "100 - increase(mysql_global_status_innodb_buffer_pool_reads{ident=~\"$ident\"}[5m])/increase(mysql_global_status_innodb_buffer_pool_read_requests{ident=~\"$ident\"}[5m]) * 100", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 35, + "title": "Row lock waits / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_row_lock_waits{ident=~\"$ident\"}[1m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 36, + "title": "Row lock time / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_row_lock_time{ident=~\"$ident\"}[1m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 37, + "title": "Log fsyncs / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_os_log_fsyncs{ident=~\"$ident\"}[1m])", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 38, + "title": "Buffer Pool Pages Utilization %", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_buffer_pool_pages_utilization{ident=~\"$ident\"}", + "legendFormat": "{{ident}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "ident", + "multi": false, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mysql_global_status_uptime, ident)", + "query": { + "query": "label_values(mysql_global_status_uptime, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "MySQL Overview by ident", + "uid": "categraf-mysql-dashboard-by-ident-14b27f", + "version": 1, + "weekStart": "" +} diff --git a/inputs/mysql/dashboard-by-instance_grafana.json b/inputs/mysql/dashboard-by-instance_grafana.json new file mode 100644 index 00000000..6d8c0bfa --- /dev/null +++ b/inputs/mysql/dashboard-by-instance_grafana.json @@ -0,0 +1,2036 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Basic Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "MySQL Uptime Days", + "type": "stat", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_uptime{instance=~\"$instance\"}/3600/24", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Current QPS", + "type": "stat", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_queries{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "description": "mysql_global_status_queries" + }, + { + "id": 4, + "title": "InnoDB Buffer Pool", + "type": "stat", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_variables_innodb_buffer_pool_size{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "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." + }, + { + "id": 5, + "title": "Table Locks Waited(5min)", + "type": "stat", + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(mysql_global_status_table_locks_waited{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "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." + }, + { + "id": 6, + "title": "Slave Replication Lag", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_slave_status_seconds_behind_master{instance=~\"$instance\"} - mysql_slave_status_sql_delay{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Connections", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "collapsed": false + }, + { + "id": 8, + "title": "MySQL Connections", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_threads_connected{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Connections", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 9, + "title": "MySQL Connections Used Percent", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_threads_connected{instance=~\"$instance\"}/mysql_global_variables_max_connections{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 10, + "title": "MySQL Client Thread Running", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_threads_running{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Threads Running", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Threads Connected is the number of open connections, while Threads Running is the number of threads not sleeping." + }, + { + "id": 11, + "title": "Max Used and Aborted Connections", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_max_used_connections{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Max Used Connections", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_aborted_connects{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Aborted Connections", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 12, + "title": "Query Performance", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "collapsed": false + }, + { + "id": 13, + "title": "MySQL Temporary Objects", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_created_tmp_tables{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Created Tmp Tables", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_created_tmp_disk_tables{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Created Tmp Disk Tables", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_created_tmp_files{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Created Tmp Files", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "MySQL Select Types", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_full_join{ instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Select Full Join", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_full_range_join{ instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Select Full Range Join", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_range{ instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Select Range", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_range_check{ instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Select Range Check", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_select_scan{ instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Select Scan", + "range": true, + "refId": "E" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 15, + "title": "MySQL Sorts", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_rows{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Sort Rows", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_range{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Sort Range", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_merge_passes{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Sort Merge Passes", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_sort_scan{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Sort Scan", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "**MySQL Sorts**\n\nDue to a query's structure, order, or other requirements, MySQL sorts the rows before returning them. For example, if a table is ordered 1 to 10 but you want the results reversed, MySQL then has to sort the rows to return 10 to 1.\n\nThis graph also shows when sorts had to scan a whole table or a given range of a table in order to return the results and which could not have been sorted via an index." + }, + { + "id": 16, + "title": "MySQL Slow Queries", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_slow_queries{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Slow Queries", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 17, + "title": "Network", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "collapsed": false + }, + { + "id": 18, + "title": "MySQL Network Traffic", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_bytes_received{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Inbound", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_bytes_sent{instance=~\"$instance\"}[5m])", + "legendFormat": "{{instance}} {{address}} Outbound", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 19, + "title": "Commands, Handlers", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "collapsed": false + }, + { + "id": 20, + "title": "Top Command Counters", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(10, rate(mysql_global_status_commands_total{instance=~\"$instance\"}[5m])>0)", + "legendFormat": "{{instance}} {{address}} {{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 21, + "title": "Select per second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_commands_total{instance=~\"$instance\", command=\"select\"}[1m])", + "legendFormat": "{{instance}} {{address}} ", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 22, + "title": "Write(insert|update|delete) per second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_commands_total{instance=~\"$instance\", command=~\"insert|update|delete\"}[1m])", + "legendFormat": "{{instance}} {{address}} {{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 23, + "title": "TPS(commit|rollback)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 28 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_commands_total{instance=~\"$instance\", command=~\"commit|rollback\"}[1d])", + "legendFormat": "{{instance}} {{address}} {{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 24, + "title": "MySQL Handlers", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_handlers_total{instance=~\"$instance\", handler!~\"commit|rollback|savepoint.*|prepare\"}[5m])", + "legendFormat": "{{instance}} {{address}} {{handler}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 3, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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." + }, + { + "id": 25, + "title": "MySQL Transaction Handlers", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 32 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_handlers_total{instance=~\"$instance\", handler=~\"commit|rollback|savepoint.*|prepare\"}[5m])", + "legendFormat": "{{instance}} {{address}} {{handler}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 26, + "title": "Open Files", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "collapsed": false + }, + { + "id": 27, + "title": "MySQL Open Files", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 37 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_variables_open_files_limit{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Open Files Limit", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_open_files{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Open Files", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 28, + "title": "Table Openings", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "collapsed": false + }, + { + "id": 29, + "title": "Table Open Cache Hit Ratio Mysql 5.6.6+", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 42 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_table_open_cache_hits{instance=~\"$instance\"}[5m])\n/\n(\nrate(mysql_global_status_table_open_cache_hits{instance=~\"$instance\"}[5m])\n+\nrate(mysql_global_status_table_open_cache_misses{instance=~\"$instance\"}[5m])\n)", + "legendFormat": "{{instance}} {{address}} Table Open Cache Hit Ratio", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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)." + }, + { + "id": 30, + "title": "MySQL Open Tables", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 42 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_status_open_tables{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Open Tables", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mysql_global_variables_table_open_cache{instance=~\"$instance\"}", + "legendFormat": "{{instance}} {{address}} Table Open Cache", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "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)." + }, + { + "id": 31, + "title": "InnoDB", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 46 + }, + "collapsed": false + }, + { + "id": 32, + "title": "Read requests / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 47 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_buffer_pool_read_requests{instance=~\"$instance\"}[1m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 33, + "title": "Reads from disk / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 47 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_buffer_pool_reads{instance=~\"$instance\"}[1m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 34, + "title": "Reads from memory percent", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 47 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "100 - increase(mysql_global_status_innodb_buffer_pool_reads{instance=~\"$instance\"}[5m])/increase(mysql_global_status_innodb_buffer_pool_read_requests{instance=~\"$instance\"}[5m]) * 100", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 35, + "title": "Row lock waits / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_row_lock_waits{instance=~\"$instance\"}[1m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 36, + "title": "Row lock time / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_row_lock_time{instance=~\"$instance\"}[1m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 37, + "title": "Log fsyncs / second", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 51 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(mysql_global_status_innodb_os_log_fsyncs{instance=~\"$instance\"}[1m])", + "legendFormat": "{{instance}} {{address}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(mysql_global_status_uptime, instance)", + "query": { + "query": "label_values(mysql_global_status_uptime, instance)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "MySQL Overview by instance", + "uid": "categraf-mysql-dashboard-by-instance-393", + "version": 1, + "weekStart": "" +} diff --git a/inputs/net_response/dashboard-by-ziv_grafana.json b/inputs/net_response/dashboard-by-ziv_grafana.json new file mode 100644 index 00000000..2bd2391e --- /dev/null +++ b/inputs/net_response/dashboard-by-ziv_grafana.json @@ -0,0 +1,199 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Targets", + "type": "table", + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(net_response_result_code{ident=~\"$ident\"}) without (protocol, source)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 2, + "title": "Latency (s)", + "type": "table", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 7 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(net_response_response_time{ident=~\"$ident\"}) without (protocol, source)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "ident", + "multi": true, + "name": "ident", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(net_response_result_code, ident)", + "query": { + "query": "label_values(net_response_result_code, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Net Response Dashboard", + "uid": "categraf-net-response-dashboard-by-ziv-6", + "version": 1, + "weekStart": "" +} diff --git a/inputs/net_response/dashboard_grafana.json b/inputs/net_response/dashboard_grafana.json new file mode 100644 index 00000000..a0361fc2 --- /dev/null +++ b/inputs/net_response/dashboard_grafana.json @@ -0,0 +1,141 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Default chart group", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + } + }, + { + "id": 2, + "title": "Targets", + "type": "table", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(net_response_result_code) by (target)", + "legendFormat": "UP?", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(net_response_response_time) by (target)", + "legendFormat": "latency(s)", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "TCP探测", + "uid": "categraf-net-response-dashboard-ab31c123", + "version": 1, + "weekStart": "" +} diff --git a/inputs/nginx_upstream_check/dashboards_grafana.json b/inputs/nginx_upstream_check/dashboards_grafana.json new file mode 100644 index 00000000..6715f17d --- /dev/null +++ b/inputs/nginx_upstream_check/dashboards_grafana.json @@ -0,0 +1,286 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Requests", + "type": "stat", + "gridPos": { + "h": 7, + "w": 2, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "nginx_upstream_check_status_code{target=\"$target\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 2, + "title": "Rise check", + "type": "stat", + "gridPos": { + "h": 7, + "w": 6, + "x": 2, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "nginx_upstream_check_rise{target=\"$target\",upstream=\"$upstream\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 3, + "title": "Fall Check", + "type": "stat", + "gridPos": { + "h": 7, + "w": 6, + "x": 8, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "nginx_upstream_check_fall{target=\"$target\",upstream=\"$upstream\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "target", + "multi": false, + "name": "target", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_upstream_check_status_code,target)", + "query": { + "query": "label_values(nginx_upstream_check_status_code,target)", + "refId": "StandardVariableQuery" + }, + "regex": "/http:\\/\\//", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "upstream", + "multi": false, + "name": "upstream", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_upstream_check_status_code,upstream)", + "query": { + "query": "label_values(nginx_upstream_check_status_code,upstream)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Nginx Upstream", + "uid": "categraf-nginx-upstream-check-dashboards", + "version": 1, + "weekStart": "" +} diff --git a/inputs/nginx_vts/dashboards_grafana.json b/inputs/nginx_vts/dashboards_grafana.json new file mode 100644 index 00000000..c0c18434 --- /dev/null +++ b/inputs/nginx_vts/dashboards_grafana.json @@ -0,0 +1,1054 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Server Connections", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(nginx_vts_main_connections{instance=~\"$Instance\", status=~\"active|writing|reading|waiting\"}) by (status)", + "legendFormat": "{{status}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 2, + "title": "active", + "type": "stat", + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_main_connections{status=\"active\"}[1m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 3, + "title": "writing", + "type": "stat", + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_main_connections{status=\"writing\"}[1m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 4, + "title": "read", + "type": "stat", + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_main_connections{instance=\"$instance\",status=\"reading\"}[1m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 5, + "title": "waiting", + "type": "stat", + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_main_connections{status=\"waiting\"}[1m]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 6, + "title": "Server Requests", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_server_requests_total{instance=~\"$Instance\", host=~\"$Host\", code!=\"total\"}[5m])) by (code)", + "legendFormat": "{{ code }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Upstream Requests", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_upstream_requests_total{instance=~\"$Instance\", upstream=~\"^$Upstream$\", backend=~\"^$Backend$\", code!=\"total\"}[5m])) by (code)", + "legendFormat": "{{ code }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "This one is providing aggregated error codes, but it's still possible to graph these per upstream." + }, + { + "id": 8, + "title": "Request delta/sec (BACKEND)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_upstream_requests_total{backend=~\"$Backend\", instance=~\"$Instance\", code!=\"total\"} [1m])) by (code)", + "legendFormat": "{{code}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Request delta/sec (FILTER)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_filter_requests_total{filter=~\"country::$Host\", filter_name=~\"$Country\", instance=~\"$Instance\", direction!=\"total\"} [1m])) by (direction)", + "legendFormat": "{{direction}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Response times (FILTER)", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_filter_request_seconds{filter=~\"country::$Host\", filter_name=~\"$Country\", instance=~\"$Instance\"} [1m])) by (filter_name) * 1000", + "legendFormat": "{{filter_name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "bandwith delta/sec (FILTER)", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_filter_bytes_total{filter=~\"country::$Host\", filter_name=~\"$Country\", instance=~\"$Instance\"} [1m])) by (direction)", + "legendFormat": "{{direction}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Server Bytes", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_server_bytes_total{instance=~\"$Instance\", host=~\"$Host\"}[5m])) by (direction)", + "legendFormat": "{{ direction }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 13, + "title": "Upstream Bytes", + "type": "timeseries", + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_upstream_bytes_total{instance=~\"$Instance\", upstream=~\"^$Upstream$\", backend=~\"^$Backend$\"}[5m])) by (direction)", + "legendFormat": "{{ direction }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "Upstream Backend Response", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(nginx_vts_upstream_response_seconds{instance=~\"$Instance\", upstream=~\"^$Upstream$\", backend=~\"^$Backend$\"}) by (backend)", + "legendFormat": "{{ backend }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 15, + "title": "Server Cache", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(irate(nginx_vts_server_cache_total{instance=~\"$Instance\", host=~\"$Host\"}[5m])) by (status)", + "legendFormat": "{{ status }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "Country", + "multi": true, + "name": "Country", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "nginx_vts_filter_bytes_total", + "query": { + "query": "nginx_vts_filter_bytes_total", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "Instance", + "multi": false, + "name": "Instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_vts_server_bytes_total, instance)", + "query": { + "query": "label_values(nginx_vts_server_bytes_total, instance)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "Host", + "multi": false, + "name": "Host", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_vts_server_requests_total{instance=~\"$Instance\"}, host)", + "query": { + "query": "label_values(nginx_vts_server_requests_total{instance=~\"$Instance\"}, host)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "Upstream", + "multi": false, + "name": "Upstream", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_vts_upstream_requests_total{instance=~\"$Instance\"}, upstream)", + "query": { + "query": "label_values(nginx_vts_upstream_requests_total{instance=~\"$Instance\"}, upstream)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": true, + "label": "Backend", + "multi": false, + "name": "Backend", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_vts_upstream_requests_total{instance=~\"$Instance\", upstream=~\"$Upstream\"}, backend)", + "query": { + "query": "label_values(nginx_vts_upstream_requests_total{instance=~\"$Instance\", upstream=~\"$Upstream\"}, backend)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Nginx VTS", + "uid": "categraf-nginx-vts-dashboards-7826bc5d", + "version": 1, + "weekStart": "" +} diff --git a/inputs/oracle/dashboard_grafana.json b/inputs/oracle/dashboard_grafana.json new file mode 100644 index 00000000..3d6512df --- /dev/null +++ b/inputs/oracle/dashboard_grafana.json @@ -0,0 +1,1351 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Activities", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + } + }, + { + "id": 2, + "title": "execute count / second", + "type": "stat", + "gridPos": { + "h": 2, + "w": 6, + "x": 6, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(oracle_activity_execute_count_value{ident=\"$ident\", instance=\"$instance\"}[2m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 3, + "title": "user commits / second", + "type": "stat", + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(oracle_activity_user_commits_value{ident=\"$ident\", instance=\"$instance\"}[2m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 4, + "title": "user rollbacks / second", + "type": "stat", + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(oracle_activity_user_rollbacks_value{ident=\"$ident\", instance=\"$instance\"}[2m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 5, + "title": "status", + "type": "stat", + "gridPos": { + "h": 2, + "w": 6, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_up{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 6, + "title": "Waits", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + } + }, + { + "id": 7, + "title": "Time waited", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_wait_time_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "{{wait_class}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "Tablespace", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 56 + } + }, + { + "id": 9, + "title": "Used Percent", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_tablespace_bytes{ident=\"$ident\", instance=\"$instance\"}/oracle_tablespace_max_bytes{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "{{tablespace}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Free space", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_tablespace_free{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "{{tablespace}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "IO and TPS", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 80 + } + }, + { + "id": 12, + "title": "IO Requests / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_io_requests_per_second_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 13, + "title": "TPS", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 8, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_user_transaction_per_sec_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "IO Bytes / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_io_megabytes_per_second_value{ident=\"$ident\", instance=\"$instance\"}*1024*1024", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 15, + "title": "Connections", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 112 + } + }, + { + "id": 16, + "title": "Sessions", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sessions_value{ident=\"$ident\", instance=\"$instance\",status=\"ACTIVE\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 17, + "title": "Hit Ratio", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 128 + } + }, + { + "id": 18, + "title": "Buffer Cache Hit Ratio", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_buffer_cache_hit_ratio_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 19, + "title": "Redo Allocation Hit Ratio", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 6, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_redo_allocation_hit_ratio_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 20, + "title": "Row Cache Hit Ratio", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_row_cache_hit_ratio_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 21, + "title": "Library Cache Hit Ratio", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_library_cache_hit_ratio_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 22, + "title": "Physical Read Write", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 168 + } + }, + { + "id": 23, + "title": "Physical Read Write Bytes / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_physical_read_bytes_per_sec_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_Physical_Write_Bytes_Per_Sec{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 24, + "title": "Physical Read Write Total Bytes / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 6, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_physical_read_total_bytes_per_sec_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_Physical_Write_Total_Bytes_Per_Sec{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 25, + "title": "Physical RW IO Requests / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_physical_read_io_requests_per_sec_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_Physical_Write_IO_Requests_Per_Sec{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 26, + "title": "Physical RW Total IO Requests / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_physical_read_total_io_requests_per_sec_value{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "oracle_sysmetric_Physical_Write_Total_IO_Requests_Per_Sec{ident=\"$ident\", instance=\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "Telegraf" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(ident)", + "hide": 0, + "includeAll": false, + "label": "ident", + "multi": false, + "name": "ident", + "options": [], + "query": { + "query": "label_values(ident)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "query": { + "query": "label_values(instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Oracle - 模板", + "uid": "categraf-oracle-dashboard-e3188871", + "version": 1, + "weekStart": "" +} diff --git a/inputs/ping/dashboard-2.0_grafana.json b/inputs/ping/dashboard-2.0_grafana.json new file mode 100644 index 00000000..2cc4bea6 --- /dev/null +++ b/inputs/ping/dashboard-2.0_grafana.json @@ -0,0 +1,304 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "连通性", + "type": "table", + "gridPos": { + "h": 11, + "w": 7, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_result_code) by (target,subnet)", + "legendFormat": "源地址: {{subnet}} 目标地址:{{target}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 2, + "title": "延迟", + "type": "table", + "gridPos": { + "h": 11, + "w": 8, + "x": 7, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_maximum_response_ms) by (target,subnet)", + "legendFormat": "源地址: {{subnet}} 目标地址:{{target}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 3, + "title": "TTL", + "type": "timeseries", + "gridPos": { + "h": 11, + "w": 9, + "x": 15, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_ttl) by (target,subnet)", + "legendFormat": "探测源: {{subnet}}目标地址: {{target }} TTL", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "丢包率", + "type": "timeseries", + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_percent_packet_loss) by (subnet,target)", + "legendFormat": "目标地址: {{target}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Panel 5", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "collapsed": false + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "PING大盘2.0", + "uid": "categraf-ping-dashboard-2-0-14779463", + "version": 1, + "weekStart": "" +} diff --git a/inputs/ping/dashboard_grafana.json b/inputs/ping/dashboard_grafana.json new file mode 100644 index 00000000..27d57947 --- /dev/null +++ b/inputs/ping/dashboard_grafana.json @@ -0,0 +1,152 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Default chart group", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + } + }, + { + "id": 2, + "title": "Ping", + "type": "table", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_result_code) by (target)", + "legendFormat": "UP?", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_percent_packet_loss) by (target)", + "legendFormat": "Packet Loss %", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(ping_maximum_response_ms) by (target)", + "legendFormat": "latency(ms)", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "PING探测", + "uid": "categraf-ping-dashboard-c24b5668", + "version": 1, + "weekStart": "" +} diff --git a/inputs/postgresql/dashboard_grafana.json b/inputs/postgresql/dashboard_grafana.json new file mode 100644 index 00000000..2631485a --- /dev/null +++ b/inputs/postgresql/dashboard_grafana.json @@ -0,0 +1,971 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "pg_stat_database", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "连接数", + "type": "stat", + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "postgresql_numbackends{server=\"$server\",db=\"$db\"}", + "legendFormat": "{{db}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "缓存命中率", + "type": "stat", + "gridPos": { + "h": 4, + "w": 5, + "x": 5, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "postgresql_blks_hit{server=\"$server\",db=\"$db\"}/(postgresql_blks_hit{server=\"$server\",db=\"$db\"}+postgresql_blks_read{server=\"$server\",db=\"$db\"})", + "legendFormat": "{{db}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "description": "命中率低于99%,就需要适当调大shared buffer" + }, + { + "id": 4, + "title": "死锁数", + "type": "stat", + "gridPos": { + "h": 4, + "w": 5, + "x": 10, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "postgresql_deadlocks{server=\"$server\",db=\"$db\"}", + "legendFormat": "{{db}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "description": "死锁的数量,如果这个值很大说明业务逻辑有问题" + }, + { + "id": 5, + "title": "冲突数", + "type": "stat", + "gridPos": { + "h": 4, + "w": 5, + "x": 15, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "postgresql_conflicts{server=\"$server\",db=\"$db\"}", + "legendFormat": "{{db}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + }, + "description": "与恢复冲突取消的查询次数,只会在备机上发生" + }, + { + "id": 6, + "title": "事务统计", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_xact_commit{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "commit", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_xact_rollback{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "rollback", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "rollback 过多,则需要检查业务逻辑,表面业务逻辑存在问题" + }, + { + "id": 7, + "title": "数据查询统计", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_tup_returned{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "returned", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_tup_fetched{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "fetched", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "returned ,代表执行查询遍历行数\nfetched,代表返回给客户端的行数\nreturned 远大于 fetched,代表查询效率低,存在全表扫描,应增加索引进行优化" + }, + { + "id": 8, + "title": "数据更新统计", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_tup_inserted{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "inserted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_tup_updated{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "updated", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_tup_deleted{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "deleted", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "生成临时文件统计", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_temp_files{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "temp_files", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_temp_bytes{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "temp_bytes", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "temp_files较高说明存在很多排序,hash,或者聚合这种操作,可以增大work_mem减少临时文件的产生,并且同时这些操作的性能也会有较大的提升" + }, + { + "id": 10, + "title": "数据库读写时间统计", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_blk_read_time{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "blk_read_time", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_blk_write_time{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "blk_write_time", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "数据库中花费在读取文件的时间,这个值很高说明内存较小,需要频繁从磁盘读入数据文件\n数据库中花费在写数据文件的时间,pg中脏页一般写入page cache,如果这个值较高,则说明cache较小,操作系统的cache需要更积极的写入" + }, + { + "id": 11, + "title": "pg_stat_bgwriter", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "collapsed": false + }, + { + "id": 12, + "title": "checkpoint分布", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_checkpoints_timed{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "postgresql_checkpoints_timed", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_checkpoints_req{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "postgresql_checkpoints_req", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "postgresql_checkpoints_timed:指超过checkpoint_timeout的时间后触发的检查点次数\npostgresql_checkpoints_req:手动触发checkpoint或者因为WAL文件数量达到max_wal_size时也会增加,如果这个值大于postgresql_checkpoints_timed说明checkpoint_timeout设置的不合理" + }, + { + "id": 13, + "title": "checkpoint 写文件时间分布", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 18 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_checkpoint_write_time{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "checkpoint_write_time", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_checkpoint_sync_time{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "checkpoint_sync_time", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "checkpoint_write_time: 从shared buffer 中write到page cache花费的时间\ncheckpoint_sync_time : checkpoint调用fsync将脏数据刷到磁盘花费的时间,如果这个值很长,容易造成IO抖动,需要增加checkpoint_timeout或者checkpoint_completion_target" + }, + { + "id": 14, + "title": "数据块写入分布", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_buffers_checkpoint{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "buffers_checkpoint", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_buffers_clean{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "buffers_clean", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_buffers_backend{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "buffers_backend", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(postgresql_buffers_backend_fsync{server=\"$server\",db=\"$db\"}[5m])", + "legendFormat": "buffers_backend_fsync", + "range": true, + "refId": "D" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "buffers_checkpoint: checkpoint写数据块数量\nbuffers_clean:bgwriter写入数据块的数量\nbuffers_backend:通过backend写入的块数量, 此值过大,代表shared buffer没有维护好,后端进程不得不自己去进行刷盘的动作\nbuffers_backend_fsync: backend需要fsync的次数\n" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "server", + "multi": false, + "name": "server", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(postgresql_datid,server)", + "query": { + "query": "label_values(postgresql_datid,server)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "db", + "multi": false, + "name": "db", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(postgresql_datid{server=\"$server\"},db)", + "query": { + "query": "label_values(postgresql_datid{server=\"$server\"},db)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "postgresql大盘", + "uid": "categraf-postgresql-dashboard-9a528558", + "version": 1, + "weekStart": "" +} diff --git a/inputs/rabbitmq/dashboard-3.8_grafana.json b/inputs/rabbitmq/dashboard-3.8_grafana.json new file mode 100644 index 00000000..b3112cf2 --- /dev/null +++ b/inputs/rabbitmq/dashboard-3.8_grafana.json @@ -0,0 +1,1901 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Overview", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Ready messages", + "type": "stat", + "gridPos": { + "h": 3, + "w": 7, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_ready )", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Incoming messages / s", + "type": "stat", + "gridPos": { + "h": 3, + "w": 5, + "x": 7, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_publish{ident=\"$rabbitmq_cluster\"}[60s]))", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 4, + "title": "Publishers", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_overview_channels{ident=\"$rabbitmq_cluster\"}) - sum(rabbitmq_overview_consumers{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "Connections", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_overview_connections{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "Queues", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_overview_queues {ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 7, + "title": "Unacknowledged messages", + "type": "stat", + "gridPos": { + "h": 3, + "w": 7, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_unack {ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 8, + "title": "Outgoing messages / s", + "type": "stat", + "gridPos": { + "h": 3, + "w": 5, + "x": 7, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_overview_messages_redelivered{ident=\"$rabbitmq_cluster\"}[60s]) )+\nsum(rate(rabbitmq_overview_messages_delivered{ident=\"$rabbitmq_cluster\"}[60s]) )", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 9, + "title": "Consumers", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_overview_consumers{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 10, + "title": "Channels", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_overview_channels{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 11, + "title": "Nodes", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(rabbitmq_node_uptime{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 12, + "title": "Nodes", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "collapsed": false + }, + { + "id": 13, + "title": "nodes", + "type": "table", + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_node_uptime{ident=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 14, + "title": "Memory available before publishers blocked", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_node_mem_limit{ident=\"$rabbitmq_cluster\"} - rabbitmq_node_mem_total{ident=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "If the value is zero or less, the memory alarm will be triggered and all publishing connections across all cluster nodes will be blocked.\n\nThis value can temporarily go negative because the memory alarm is triggered with a slight delay.\n\nThe kernel's view of the amount of memory used by the node can differ from what the node itself can observe. This means that this value can be negative for a sustained period of time.\n\nBy default nodes use resident set size (RSS) to compute how much memory they use. This strategy can be changed (see the guides below).\n\n* [Alarms](https://www.rabbitmq.com/alarms.html)\n* [Memory Alarms](https://www.rabbitmq.com/memory.html)\n* [Reasoning About Memory Use](https://www.rabbitmq.com/memory-use.html)\n* [Blocked Connection Notifications](https://www.rabbitmq.com/connection-blocked.html)" + }, + { + "id": 15, + "title": "Disk space available before publishers blocked", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_node_disk_free{ident=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 1, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "This metric is reported for the partition where the RabbitMQ data directory is stored.\n\nIf the value is zero or less, the disk alarm will be triggered and all publishing connections across all cluster nodes will be blocked.\n\nThis value can temporarily go negative because the free disk space alarm is triggered with a slight delay.\n\n* [Alarms](https://www.rabbitmq.com/alarms.html)\n* [Disk Space Alarms](https://www.rabbitmq.com/disk-alarms.html)\n* [Disk Space](https://www.rabbitmq.com/production-checklist.html#resource-limits-disk-space)\n* [Persistence Configuration](https://www.rabbitmq.com/persistence-conf.html)\n* [Blocked Connection Notifications](https://www.rabbitmq.com/connection-blocked.html)" + }, + { + "id": 16, + "title": "File descriptors available", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(rabbitmq_node_fd_total {ident=\"$rabbitmq_cluster\"}) -\n(rabbitmq_node_fd_used{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "When this value reaches zero, new connections will not be accepted and disk write operations may fail.\n\nClient libraries, peer nodes and CLI tools will not be able to connect when the node runs out of available file descriptors.\n\n* [Open File Handles Limit](https://www.rabbitmq.com/production-checklist.html#resource-limits-file-handle-limit)" + }, + { + "id": 17, + "title": "TCP sockets available", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(rabbitmq_node_sockets_total {ident=\"$rabbitmq_cluster\"}) -\n(rabbitmq_node_sockets_used{ident=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "When this value reaches zero, new connections will not be accepted.\n\nClient libraries, peer nodes and CLI tools will not be able to connect when the node runs out of available file descriptors.\n\n* [Networking and RabbitMQ](https://www.rabbitmq.com/networking.html)" + }, + { + "id": 18, + "title": "QUEUED MESSAGES", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "collapsed": false + }, + { + "id": 19, + "title": "Messages ready to be delivered to consumers", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_ready {ident=\"$rabbitmq_cluster\"}) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Total number of ready messages ready to be delivered to consumers.\n\nAim to keep this value as low as possible. RabbitMQ behaves best when messages are flowing through it. It's OK for publishers to occasionally outpace consumers, but the expectation is that consumers will eventually process all ready messages.\n\nIf this metric keeps increasing, your system will eventually run out of memory and/or disk space. Consider using TTL or Queue Length Limit to prevent unbounded message growth.\n\n* [Queues](https://www.rabbitmq.com/queues.html)\n* [Consumers](https://www.rabbitmq.com/consumers.html)\n* [Queue Length Limit](https://www.rabbitmq.com/maxlength.html)\n* [Time-To-Live and Expiration](https://www.rabbitmq.com/ttl.html)" + }, + { + "id": 20, + "title": "Messages pending consumer acknowledgement", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_unack {ident=\"$rabbitmq_cluster\"}) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The total number of messages that are either in-flight to consumers, currently being processed by consumers or simply waiting for the consumer acknowledgements to be processed by the queue. Until the queue processes the message acknowledgement, the message will remain unacknowledged.\n\n* [Queues](https://www.rabbitmq.com/queues.html)\n* [Confirms and Acknowledgements](https://www.rabbitmq.com/confirms.html)\n* [Consumer Prefetch](https://www.rabbitmq.com/consumer-prefetch.html)" + }, + { + "id": 21, + "title": "INCOMING MESSAGES", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "collapsed": false + }, + { + "id": 22, + "title": "Messages published / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_publish{ident=\"$rabbitmq_cluster\"}[60s]) )by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The incoming message rate before any routing rules are applied.\n\nIf this value is lower than the number of messages published to queues, it may indicate that some messages are delivered to more than one queue.\n\nIf this value is higher than the number of messages published to queues, messages cannot be routed and will either be dropped or returned to publishers.\n\n* [Publishers](https://www.rabbitmq.com/publishers.html)" + }, + { + "id": 23, + "title": "Messages confirmed to publishers / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 23 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_publish{ident=\"$rabbitmq_cluster\"}[60s])) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of messages confirmed by the broker to publishers. Publishers must opt-in to receive message confirmations.\n\nIf this metric is consistently at zero it may suggest that publisher confirms are not used by clients. The safety of published messages is likely to be at risk.\n\n* [Publisher Confirms](https://www.rabbitmq.com/confirms.html#publisher-confirms)\n* [Publisher Confirms and Data Safety](https://www.rabbitmq.com/publishers.html#data-safety)\n* [When Will Published Messages Be Confirmed by the Broker?](https://www.rabbitmq.com/confirms.html#when-publishes-are-confirmed)" + }, + { + "id": 24, + "title": "Messages routed to queues / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_publish{ident=\"$rabbitmq_cluster\"}[60s])) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of messages received from publishers and successfully routed to the master queue replicas.\n\n* [Queues](https://www.rabbitmq.com/queues.html)\n* [Publishers](https://www.rabbitmq.com/publishers.html)" + }, + { + "id": 25, + "title": "Messages unconfirmed to publishers / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_unack{ident=\"$rabbitmq_cluster\"}[60s])) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of messages received from publishers that have publisher confirms enabled and the broker has not confirmed yet.\n\n* [Publishers](https://www.rabbitmq.com/publishers.html)\n* [Confirms and Acknowledgements](https://www.rabbitmq.com/confirms.html)\n* [When Will Published Messages Be Confirmed by the Broker?](https://www.rabbitmq.com/confirms.html#when-publishes-are-confirmed)" + }, + { + "id": 26, + "title": "Unroutable messages dropped / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 29 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_overview_return_unroutable{ident=\"$rabbitmq_cluster\"}[60s])) by (ident)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of messages that cannot be routed and are dropped. \n\nAny value above zero means message loss and likely suggests a routing problem on the publisher end.\n\n* [Unroutable Message Handling](https://www.rabbitmq.com/publishers.html#unroutable)" + }, + { + "id": 27, + "title": "OUTGOING MESSAGES", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "collapsed": false + }, + { + "id": 28, + "title": "Messages delivered / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 33 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(\n (rate(rabbitmq_queue_messages_deliver{ident=\"$rabbitmq_cluster\"}[60s]) ) \n) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of messages delivered to consumers. It includes messages that have been redelivered.\n\nThis metric does not include messages that have been fetched by consumers using `basic.get` (consumed by polling).\n\n* [Consumers](https://www.rabbitmq.com/consumers.html)" + }, + { + "id": 29, + "title": "Messages redelivered / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 33 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_redeliver{ident=\"$rabbitmq_cluster\"}[60s])) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of messages that have been redelivered to consumers. It includes messages that have been requeued automatically and redelivered due to channel exceptions or connection closures.\n\nHaving some redeliveries is expected, but if this metric is consistently non-zero, it is worth investigating why.\n\n* [Negative Acknowledgement and Requeuing of Deliveries](https://www.rabbitmq.com/confirms.html#consumer-nacks-requeue)\n* [Consumers](https://www.rabbitmq.com/consumers.html)" + }, + { + "id": 30, + "title": "Messages delivered with ack / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 36 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_ack{ident=\"$rabbitmq_cluster\"}[60s]) ) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of message deliveries to consumers that use manual acknowledgement mode.\n\nWhen this mode is used, RabbitMQ waits for consumers to acknowledge messages before more messages can be delivered.\n\nThis is the safest way of consuming messages.\n\n* [Consumer Acknowledgements](https://www.rabbitmq.com/confirms.html)\n* [Consumer Prefetch](https://www.rabbitmq.com/consumer-prefetch.html)\n* [Consumer Acknowledgement Modes, Prefetch and Throughput](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput)\n* [Consumers](https://www.rabbitmq.com/consumers.html)" + }, + { + "id": 31, + "title": "Messages acknowledged / s", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 36 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_ack{ident=\"$rabbitmq_cluster\"}[60s])) by(node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "The rate of message acknowledgements coming from consumers that use manual acknowledgement mode.\n\n* [Consumer Acknowledgements](https://www.rabbitmq.com/confirms.html)\n* [Consumer Prefetch](https://www.rabbitmq.com/consumer-prefetch.html)\n* [Consumer Acknowledgement Modes, Prefetch and Throughput](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput)\n* [Consumers](https://www.rabbitmq.com/consumers.html)" + }, + { + "id": 32, + "title": "QUEUES", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 39 + }, + "collapsed": false + }, + { + "id": 33, + "title": "Total queues", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 40 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_overview_queues {ident=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Total number of queue masters per node. \n\nThis metric makes it easy to see sub-optimal queue distribution in a cluster.\n\n* [Queue Masters, Data Locality](https://www.rabbitmq.com/ha.html#master-migration-data-locality)\n* [Queues](https://www.rabbitmq.com/queues.html)" + }, + { + "id": 34, + "title": "CHANNELS", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "collapsed": false + }, + { + "id": 35, + "title": "Total channels", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 44 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_overview_channels{ident=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Total number of channels on all currently opened connections.\n\nIf this metric grows monotonically it is highly likely a channel leak in one of the applications. Confirm channel leaks by using the _Channels opened_ and _Channels closed_ metrics.\n\n* [Channel Leak](https://www.rabbitmq.com/channels.html#channel-leaks)\n* [Channels](https://www.rabbitmq.com/channels.html)" + }, + { + "id": 36, + "title": "CONNECTIONS", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 47 + }, + "collapsed": false + }, + { + "id": 37, + "title": "Total connections", + "type": "timeseries", + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 48 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_overview_connections {ident=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "description": "Total number of client connections.\n\nIf this metric grows monotonically it is highly likely a connection leak in one of the applications. Confirm connection leaks by using the _Connections opened_ and _Connections closed_ metrics.\n\n* [Connection Leak](https://www.rabbitmq.com/connections.html#monitoring)\n* [Connections](https://www.rabbitmq.com/connections.html)" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "rabbitmq_cluster", + "multi": false, + "name": "rabbitmq_cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(rabbitmq_node_uptime, ident)", + "query": { + "query": "label_values(rabbitmq_node_uptime, ident)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "RabbitMQ", + "uid": "categraf-rabbitmq-dashboard-3-8-eb50e6bc", + "version": 1, + "weekStart": "" +} diff --git a/inputs/rabbitmq/dashboard_grafana.json b/inputs/rabbitmq/dashboard_grafana.json new file mode 100644 index 00000000..054009f7 --- /dev/null +++ b/inputs/rabbitmq/dashboard_grafana.json @@ -0,0 +1,2579 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Overview", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + } + }, + { + "id": 2, + "title": "Ready messages", + "type": "stat", + "gridPos": { + "h": 2, + "w": 7, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_ready * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "Incoming messages / s", + "type": "stat", + "gridPos": { + "h": 2, + "w": 5, + "x": 7, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_published_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 4, + "title": "Publishers", + "type": "stat", + "gridPos": { + "h": 2, + "w": 4, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_channels * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) - sum(rabbitmq_channel_consumers * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 5, + "title": "Connections", + "type": "stat", + "gridPos": { + "h": 2, + "w": 4, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_connections * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 6, + "title": "Queues", + "type": "stat", + "gridPos": { + "h": 2, + "w": 4, + "x": 20, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queues * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 7, + "title": "Unacknowledged messages", + "type": "stat", + "gridPos": { + "h": 2, + "w": 7, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_unacked * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 8, + "title": "Outgoing messages / s", + "type": "stat", + "gridPos": { + "h": 2, + "w": 5, + "x": 7, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_redelivered_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) +\nsum(rate(rabbitmq_channel_messages_delivered_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) +\nsum(rate(rabbitmq_channel_messages_delivered_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) +\nsum(rate(rabbitmq_channel_get_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) +\nsum(rate(rabbitmq_channel_get_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 9, + "title": "Consumers", + "type": "stat", + "gridPos": { + "h": 2, + "w": 4, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_channel_consumers * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 10, + "title": "Channels", + "type": "stat", + "gridPos": { + "h": 2, + "w": 4, + "x": 16, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_channels * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 11, + "title": "Nodes", + "type": "stat", + "gridPos": { + "h": 2, + "w": 4, + "x": 20, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_build_info * on(instance) group_left(rabbitmq_cluster) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 12, + "title": "Nodes", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 88 + } + }, + { + "id": 13, + "title": "nodes", + "type": "table", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_build_info * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 14, + "title": "Memory available before publishers blocked", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(rabbitmq_resident_memory_limit_bytes * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) -\n(rabbitmq_process_resident_memory_bytes * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 15, + "title": "Disk space available before publishers blocked", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 8, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_disk_space_available_bytes * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 16, + "title": "File descriptors available", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(rabbitmq_process_max_fds * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) -\n(rabbitmq_process_open_fds * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 17, + "title": "TCP sockets available", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(rabbitmq_process_max_tcp_sockets * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) -\n(rabbitmq_process_open_tcp_sockets * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 18, + "title": "QUEUED MESSAGES", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 136 + } + }, + { + "id": 19, + "title": "Messages ready to be delivered to consumers", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_ready * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 20, + "title": "Messages pending consumer acknowledgement", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rabbitmq_queue_messages_unacked * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 21, + "title": "INCOMING MESSAGES", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 160 + } + }, + { + "id": 22, + "title": "Messages published / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_published_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 23, + "title": "Messages confirmed to publishers / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_confirmed_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 24, + "title": "Messages routed to queues / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queue_messages_published_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 25, + "title": "Messages unconfirmed to publishers / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_unconfirmed[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 26, + "title": "Unroutable messages dropped / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_unroutable_dropped_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 27, + "title": "Unroutable messages returned to publishers / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_unroutable_returned_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 28, + "title": "OUTGOING MESSAGES", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 216 + } + }, + { + "id": 29, + "title": "Messages delivered / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(\n (rate(rabbitmq_channel_messages_delivered_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) +\n (rate(rabbitmq_channel_messages_delivered_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"})\n) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 30, + "title": "Messages redelivered / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_redelivered_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 31, + "title": "Messages delivered with manual ack / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_delivered_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 32, + "title": "Messages delivered auto ack / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_delivered_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 33, + "title": "Messages acknowledged / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_messages_acked_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 34, + "title": "Polling operations with auto ack / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_get_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 35, + "title": "Polling operations that yield no result / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 3 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_get_empty_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 36, + "title": "Polling operations with manual ack / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 3 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channel_get_ack_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 37, + "title": "QUEUES", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 288 + } + }, + { + "id": 38, + "title": "Total queues", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_queues * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 39, + "title": "Queues declared / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 4, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queues_declared_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 40, + "title": "Queues created / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 4, + "x": 16, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queues_created_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 41, + "title": "Queues deleted / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 4, + "x": 20, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_queues_deleted_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 42, + "title": "CHANNELS", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 328 + } + }, + { + "id": 43, + "title": "Total channels", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_channels * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 44, + "title": "Channels opened / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channels_opened_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 45, + "title": "Channels closed / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_channels_closed_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 46, + "title": "CONNECTIONS", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 360 + } + }, + { + "id": 47, + "title": "Connections closed / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_connections_closed_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 48, + "title": "Total connections", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rabbitmq_connections * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 49, + "title": "Connections opened / s", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(rabbitmq_connections_opened_total[60s]) * on(instance) group_left(rabbitmq_cluster, rabbitmq_node) rabbitmq_identity_info{rabbitmq_cluster=\"$rabbitmq_cluster\"}) by(rabbitmq_node)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(rabbitmq_cluster)", + "hide": 0, + "includeAll": false, + "label": "rabbitmq_cluster", + "multi": false, + "name": "rabbitmq_cluster", + "options": [], + "query": { + "query": "label_values(rabbitmq_cluster)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "RabbitMQ 3.8+", + "uid": "categraf-rabbitmq-dashboard-8157595f", + "version": 1, + "weekStart": "" +} diff --git a/inputs/redis/dashboard_grafana.json b/inputs/redis/dashboard_grafana.json new file mode 100644 index 00000000..665dcde8 --- /dev/null +++ b/inputs/redis/dashboard_grafana.json @@ -0,0 +1,993 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Basic Info", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Panel 2", + "type": "text", + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 3, + "title": "Redis Uptime Days", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "min(redis_uptime_in_seconds{instance=~\"$instance\"})/3600/24", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 4, + "title": "Connected Clients", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(redis_connected_clients{instance=~\"$instance\"})", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 5, + "title": "Memory Used", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "redis_used_memory{instance=~\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 6, + "title": "Max Memory Limit", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "redis_maxmemory{instance=~\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 7, + "title": "Fragmentation Ratio", + "type": "stat", + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "redis_mem_fragmentation_ratio{instance=~\"$instance\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + } + }, + { + "id": 8, + "title": "Commands", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "collapsed": false + }, + { + "id": 9, + "title": "Commands Executed / sec", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(redis_total_commands_processed{instance=~\"$instance\"}[5m])", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Hits / Misses per Sec", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(redis_keyspace_hits{instance=~\"$instance\"}[5m])", + "legendFormat": "hits", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate(redis_keyspace_misses{instance=~\"$instance\"}[5m])", + "legendFormat": "misses", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "Top Commands", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "topk(5, irate(redis_cmdstat_calls{instance=~\"$instance\"} [1m]))", + "legendFormat": "{{command}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Keys", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "collapsed": false + }, + { + "id": 13, + "title": "Total Items per DB", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum (redis_keyspace_keys{instance=~\"$instance\"}) by (db)", + "legendFormat": "{{db}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "Expired / Evicted", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(redis_expired_keys{instance=~\"$instance\"}[5m])) by (instance)", + "legendFormat": "expired", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(redis_evicted_keys{instance=~\"$instance\"}[5m])) by (instance)", + "legendFormat": "evicted", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 15, + "title": "Expiring vs Not-Expiring Keys", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 10 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(redis_keyspace_keys{instance=~\"$instance\"}) - sum(redis_keyspace_expires{instance=~\"$instance\"}) ", + "legendFormat": "not expiring", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(redis_keyspace_expires{instance=~\"$instance\"}) ", + "legendFormat": "expiring", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 16, + "title": "Network and CPU usage", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 14 + }, + "collapsed": false + }, + { + "id": 17, + "title": "Network I/O", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 15 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(redis_total_net_input_bytes{instance=~\"$instance\"}[5m]))", + "legendFormat": "input", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(redis_total_net_output_bytes{instance=~\"$instance\"}[5m]))", + "legendFormat": "output", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 18, + "title": "CPU Usage", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 15 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "irate (redis_used_cpu_sys{instance=~\"$instance\"}[1m]) * 100 + irate (redis_used_cpu_user{instance=~\"$instance\"}[1m]) * 100", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "Redis", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(redis_uptime_in_seconds,instance)", + "query": { + "query": "label_values(redis_uptime_in_seconds,instance)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Redis Overview by instance", + "uid": "categraf-redis-dashboard-b6eee2c2", + "version": 1, + "weekStart": "" +} diff --git a/inputs/sqlserver/sqlserver_dash_grafana.json b/inputs/sqlserver/sqlserver_dash_grafana.json new file mode 100644 index 00000000..8cf2be04 --- /dev/null +++ b/inputs/sqlserver/sqlserver_dash_grafana.json @@ -0,0 +1,684 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "Server resource overview", + "type": "table", + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Total Server Memory (KB)\",serverName=\"$instance\"}", + "legendFormat": "Total RAM", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Total Server Memory (KB)\",serverName=\"$instance\"}-sqlserver_performance_value{counter=\"Used memory (KB)\",serverName=\"$instance\"}", + "legendFormat": "RAM availbable", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Free Space in tempdb (KB)\",serverName=\"$instance\"}", + "legendFormat": "Pagefile available size", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Page life expectancy\",serverName=\"$instance\"}", + "legendFormat": "Total page faults", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Batch Requests/sec\",serverName=\"$instance\"}", + "legendFormat": "Batch reqs /sec", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Page life expectancy\",serverName=\"$instance\"}", + "legendFormat": "Page life expectancy(sec)", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Number of Deadlocks/sec\",serverName=\"$instance\"}", + "legendFormat": "Deadlocks", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Errors/sec\",serverName=\"$instance\"}", + "legendFormat": "User errors /sec", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mssql_kill_connection_errors{job=~\"$Job\"}-0", + "legendFormat": "Kill conn errors /sec", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_cpu_system_idle_cpu{serverName=\"$instance\"}", + "legendFormat": "sqlserver_cpu_system_idle", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_up{serverName=\"$instance\"}", + "legendFormat": "sqlserver_up", + "range": true, + "refId": "L" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 2, + "title": "Summary", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "collapsed": false + }, + { + "id": 3, + "title": "当前数据库连接", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 7, + "x": 0, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Logical Connections\",serverName=\"$instance\"}", + "legendFormat": "{{sql_instance}} ", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "DB Log growth since last restart", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 9, + "x": 7, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Log Growths\",serverName=\"$instance\"}", + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Number of Deadlocks/sec", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 4 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_performance_value{counter=\"Number of Deadlocks/sec\",serverName=\"$instance\"}", + "legendFormat": "Number of Deadlocks/sec", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "硬盘空闲空间", + "type": "bargauge", + "gridPos": { + "h": 7, + "w": 7, + "x": 0, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_volume_space_available_space_bytes{serverName=\"$instance\"}", + "legendFormat": "硬盘空闲空间", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 7, + "title": "CPU", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 9, + "x": 7, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_cpu_sqlserver_process_cpu{serverName=\"$instance\"}", + "legendFormat": "CPU", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "Total wait time of I/O stall", + "type": "timeseries", + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 11 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_database_io_read_latency_ms{serverName=\"$instance\",database_name=\"h3cloud\"}", + "legendFormat": "io_read_latency_ms", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Database I/O wait of stall detailed", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "collapsed": false + }, + { + "id": 10, + "title": "Database wait by I/O stall ", + "type": "timeseries", + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sqlserver_database_io_rg_write_stall_ms{serverName=\"$instance\"}+sqlserver_database_io_rg_read_stall_ms{serverName=\"$instance\"}", + "legendFormat": "{{database_name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(sqlserver_up,sql_instance)", + "query": { + "query": "label_values(sqlserver_up,sql_instance)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "SQLServer", + "uid": "categraf-sqlserver-sqlserver-dash-ca6a78", + "version": 1, + "weekStart": "" +} diff --git a/inputs/switch_legacy/dashboard_grafana.json b/inputs/switch_legacy/dashboard_grafana.json new file mode 100644 index 00000000..127450ef --- /dev/null +++ b/inputs/switch_legacy/dashboard_grafana.json @@ -0,0 +1,829 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "总体概览", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "交换机数目", + "type": "stat", + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(switch_legacy_sysUpTime)", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "CPU使用率排名", + "type": "bargauge", + "gridPos": { + "h": 4, + "w": 8, + "x": 3, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_cpu_util", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 4, + "title": "网络in流量大于300MB", + "type": "bargauge", + "gridPos": { + "h": 4, + "w": 13, + "x": 11, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(switch_legacy_if_in) by(ip)>300000000", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 5, + "title": "采集耗时", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 3, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_ifstat_use_time_sec", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "内存使用率排名", + "type": "bargauge", + "gridPos": { + "h": 4, + "w": 8, + "x": 3, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_mem_util", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 7, + "title": "网络out流量大于300MB", + "type": "bargauge", + "gridPos": { + "h": 4, + "w": 13, + "x": 11, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(switch_legacy_if_out) by(ip)>300000000", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 8, + "title": "设备运行时长", + "type": "bargauge", + "gridPos": { + "h": 4, + "w": 11, + "x": 0, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_sysUpTime/100/(24*3600)", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 9, + "title": "设备温度", + "type": "bargauge", + "gridPos": { + "h": 4, + "w": 13, + "x": 11, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_TempStatus", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 10, + "title": "单机详情", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "collapsed": false + }, + { + "id": 11, + "title": "cpu使用率", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_cpu_util{ip=\"$IP\"}", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "网络in流量", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_if_in{ip=\"$IP\"}>0", + "legendFormat": "{{ip}}-{{ifname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 13, + "title": "内存使用率", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_mem_util{ip=\"$IP\"}", + "legendFormat": "{{ip}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "网络out流量", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 19 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "switch_legacy_if_out{ip=\"$IP\"}>0", + "legendFormat": "{{ip}}-{{ifname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "IP", + "multi": false, + "name": "IP", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(switch_legacy_if_in,ip)", + "query": { + "query": "label_values(switch_legacy_if_in,ip)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Interface", + "multi": false, + "name": "Interface", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(switch_legacy_if_in{ip=\"$IP\"},ifname)", + "query": { + "query": "label_values(switch_legacy_if_in{ip=\"$IP\"},ifname)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "网络交换机", + "uid": "categraf-switch-legacy-dashboard-8e7b656", + "version": 1, + "weekStart": "" +} diff --git a/inputs/system/README.md b/inputs/system/README.md index 22481b29..32adb22b 100644 --- a/inputs/system/README.md +++ b/inputs/system/README.md @@ -4,4 +4,16 @@ ## 监控大盘和告警规则 -该 README 文件所在的同级目录下有监控大盘和告警规则的配置JSON文件,导入夜莺即可使用 \ No newline at end of file +该 README 文件所在的同级目录下提供了以下监控配置文件: + +- `dashboard.json`: 夜莺 Dashboard,可以直接导入夜莺使用。 +- `dashboard_grafana.json`: Grafana Dashboard,导入后选择 Prometheus 兼容数据源即可使用。 +- `alerts-linux.json`: Linux 主机相关告警规则,可以导入夜莺使用。 + +## Dashboard and alert rules + +This directory provides the following monitoring configuration files: + +- `dashboard.json`: Nightingale Dashboard, ready to import into Nightingale. +- `dashboard_grafana.json`: Grafana Dashboard. Select a Prometheus-compatible datasource after import. +- `alerts-linux.json`: Linux host alert rules for Nightingale. diff --git a/inputs/system/dashboard_grafana.json b/inputs/system/dashboard_grafana.json new file mode 100644 index 00000000..565b1667 --- /dev/null +++ b/inputs/system/dashboard_grafana.json @@ -0,0 +1,7983 @@ +{ + "annotations": { + "list": [ + { + "$$hashKey": "object:1243", + "builtIn": 1, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 70 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 59 + ] + }, + "hide": true, + "iconColor": "background6", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 71 + ] + }, + "hide": true, + "iconColor": "background6", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 72 + ] + }, + "hide": true, + "iconColor": "background6", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 86 + ] + }, + "hide": true, + "iconColor": "background6", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 35 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 73 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 76 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 49 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 83 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 23 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 84 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 85 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 18 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 89 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 90 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 91 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 93 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 95 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 94 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 92 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "enable": true, + "filter": { + "exclude": false, + "ids": [ + 96 + ] + }, + "hide": true, + "iconColor": "red", + "name": "T1", + "target": { + "queryType": "timeRegions", + "refId": "Anno", + "timeRegion": { + "timezone": "utc" + } + } + } + ] + }, + "description": "Linux host overview dashboard for Categraf native system metrics. Select a Prometheus-compatible datasource after import.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 5363, + "graphTooltip": 1, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 28, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "empty", + "result": { + "color": "dark-red", + "index": 0, + "text": "宕机" + } + }, + "type": "special" + }, + { + "options": { + "pattern": "^\\d?\\d*$", + "result": { + "color": "dark-green", + "index": 1, + "text": "存活" + } + }, + "type": "regex" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 0, + "y": 1 + }, + "hideTimeOverride": true, + "id": 2, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "system_uptime{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "实例状态", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 3, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "OFFLINE" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "dtdurations" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 3, + "y": 1 + }, + "hideTimeOverride": true, + "id": 62, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "system_uptime{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "运行时长", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 6, + "y": 1 + }, + "hideTimeOverride": true, + "id": 24, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_n_cpus{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU物理核心数", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 9, + "y": 1 + }, + "hideTimeOverride": true, + "id": 27, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mem_total{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "物理内存总容量", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "": { + "text": "" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 12, + "y": 1 + }, + "hideTimeOverride": true, + "id": 61, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_total{ident=~\"$ident\",busigroup=~\"$busigroup\",path=~\"/\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "系统盘总容量", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 15, + "y": 1 + }, + "hideTimeOverride": true, + "id": 105, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(disk_total{ident=~\"$ident\",busigroup=~\"$busigroup\",path!~\"/\",device!~\"obsfs\"})", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "数据盘总容量", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "": { + "text": "" + } + }, + "type": "value" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 18, + "y": 1 + }, + "hideTimeOverride": true, + "id": 64, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "100-cpu_usage_idle{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU使用率", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "": { + "text": "" + } + }, + "type": "value" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 1 + }, + "hideTimeOverride": true, + "id": 65, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mem_used_percent{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "内存使用率", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "": { + "text": "" + } + }, + "type": "value" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 95 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 0, + "y": 3 + }, + "hideTimeOverride": true, + "id": 66, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "linux_sysctl_fs_file_nr{ident=~\"$ident\",busigroup=~\"$busigroup\"}/linux_sysctl_fs_file_max{ident=~\"$ident\",busigroup=~\"$busigroup\"}*100", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "FD使用率", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "": { + "text": "" + } + }, + "type": "value" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 10 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 3, + "y": 3 + }, + "hideTimeOverride": true, + "id": 67, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_n_users{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "当前登录用户数", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "": { + "text": "" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1000 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 6, + "y": 3 + }, + "hideTimeOverride": true, + "id": 63, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ntp_offset_ms{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "时间同步延迟", + "type": "stat" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 基础概览", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 69, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "\"系统负载 = CPU逻辑核数 * 0.7” --开始关注\n“系统负载 = CPU逻辑核数 * 1.0” --马上修复\n“系统负载 >= CPU逻辑核数 * 5.0” --已经开始出现比较严重的问题了\n\n1.先确定 “system load average 持续大于 CPU总逻辑核数 *1”,若是,则可以确定是负载较高;\n2.再看CPU使用率、CPU idle、CPU IO wait、内存等等指标是否正常,排除是否正常的业务逻辑导致CPU持续高负载\n3.若CPU使用率很低、 CPU IO wait也很低,其他指标也很低,那可能是CPU上下文切换导致。\n```", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 6 + }, + "id": 70, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_load1{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_load5{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_load15{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "system_n_cpus{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + } + ], + "title": "$ident 系统负载", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 系统负载(每单核CPU)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 6 + }, + "id": 59, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "system_load_norm_1{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "system_load_norm_5{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "system_load_norm_15{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "C" + } + ], + "title": "$ident 系统负载(每单核CPU)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 熵池大小", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 6 + }, + "id": 71, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "kernel_entropy_avail{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + } + ], + "title": "$ident 熵池大小", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "使用pidstat命令(yum install -y sysstat)查看CPU上下文切换详情\npidstat –w –u –t 1\n#其中-w是输出进程的数据指标 -u则是输出CPU的数据指标 -t输出线程的数据指标", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 12 + }, + "id": 72, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(kernel_context_switches{ident=\"$ident\",busigroup=~\"$busigroup\"}[1m])", + "interval": "", + "legendFormat": "{{ident}} context_switches", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(kernel_interrupts{ident=\"$ident\",busigroup=~\"$busigroup\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} kernel_interrupts", + "refId": "B" + } + ], + "title": "$ident 上下文切换/中断", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident fd使用", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 12 + }, + "id": 86, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "linux_sysctl_fs_file_max{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "linux_sysctl_fs_file_nr{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + } + ], + "title": "$ident fd使用", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 性能指标", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 30, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "CPU状态良好的指标状态\n1.CPU利用率:User Time <= 70%,System Time <= 35%,User Time + System Time <= 70%。\n2.上下文切换:与CPU利用率相关联,越小越好。如果CPU利用率状态良好,大量的上下文切换也是可以接受的。\n可运行队列:每个处理器的可运行队列<=3个线程。\nin 每秒CPU的中断次数,包括时间中断\ncs 每秒上下文切换次数,例如我们调用系统函数,就要进行上下文切换,线程的切换,也要进程上下文切换,这个值要越小越好,太大了,要考虑调低线程或者进程的数目,例如在apache和nginx这种web服务器中,我们一般做性能测试时会进行几千并发甚至几万并发的测试,选择web服务器的进程可以由进程或者线程的峰值一直下调,压测,直到cs到一个比较小的值,这个进程和线程数就是比较合适的值了。系统调用也是,每次调用系统函数,我们的代码就会进入内核空间,导致上下文切换,这个是很耗资源,也要尽量避免频繁调用系统函数。上下文切换次数过多表示你的CPU大部分浪费在上下文切换,导致CPU干正经事的时间少了,CPU没有充分利用,是不可取的。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 7 + }, + "id": 35, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_idle{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + } + ], + "title": "$ident CPU空闲率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "在性能测试中,系统整体的CPU使用率可以用(1-id)来计算。当us很高时,说明CPU时间主要消耗在用户代码上,可以从用户代码角度考虑优化性能;当sy很高时,说明CPU时间主要消耗在内核上,可以从是否系统调用频繁、CPU进程或线程切换频繁角度考虑性能的优化;当wa很高时,说明有进程在进行频繁的IO操作,可能是磁盘IO或者网络IO。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 7 + }, + "id": 73, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_guest{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_iowait{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_user{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_system{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_irq{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_softirq{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_nice{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_steal{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "cpu_usage_active{ident=\"$ident\",busigroup=~\"$busigroup\",cpu=\"cpu-total\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "I" + } + ], + "title": "$ident CPU使用率详情", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 7 + }, + "id": 53, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "", + "instant": false, + "range": true, + "refId": "A" + } + ], + "title": "服务CPU占用率", + "type": "timeseries" + } + ], + "repeat": "datasource", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident CPU", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 75, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": "" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 76, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_used_percent{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + } + ], + "title": "$ident 内存使用率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 物理内存", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 8 + }, + "id": 55, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mem_used{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "mem_available{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_total{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + } + ], + "title": "$ident 物理内存", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 8 + }, + "id": 77, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_active{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_cached{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_buffered{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_inactive{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_mapped{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_shared{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_swap_cached{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "G" + } + ], + "title": "$ident 用户态内存使用", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "内存指标可参考链接 [/PROC/MEMINFO之谜](http://linuxperf.com/?p=142) ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 14 + }, + "id": 78, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_slab{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_sreclaimable{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_sunreclaim{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_vmalloc_used{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "mem_vmalloc_chunk{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "E" + } + ], + "title": "$ident 内核态内存使用", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 14 + }, + "id": 56, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "application": { + "filter": "resourceforproc" + }, + "category": 0, + "countTriggersBy": "", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "evaltype": "0", + "functions": [], + "group": { + "filter": "$Group" + }, + "host": { + "filter": "$Hosts" + }, + "item": { + "filter": "/.*内存使用率.*/" + }, + "itemTag": { + "filter": "" + }, + "macro": { + "filter": "" + }, + "options": { + "count": true, + "disableDataAlignment": false, + "minSeverity": 3, + "showDisabledItems": false, + "skipEmptyValues": false, + "useTrends": "default", + "useZabbixValueMapping": false + }, + "proxy": { + "filter": "" + }, + "queryType": "0", + "refId": "A", + "resultFormat": "time_series", + "schema": 12, + "selectedEndpointsIdent": [ + "=all" + ], + "selectedTagkv": [], + "table": { + "skipEmptyValues": false + }, + "tags": { + "filter": "" + }, + "textFilter": "", + "trigger": { + "filter": "" + }, + "triggers": { + "acknowledged": 2 + } + } + ], + "title": "服务内存占用", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 内存", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 80, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 磁盘空间", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 9 + }, + "id": 49, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_free{ident=\"$ident\",busigroup=~\"$busigroup\",device!~\"obsfs.*\"}", + "interval": "", + "legendFormat": "{{ident}} {{path}} {{device}} {{__name__}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_used{ident=\"$ident\",busigroup=~\"$busigroup\",device!~\"obsfs.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{path}} {{device}} {{__name__}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_total{ident=\"$ident\",busigroup=~\"$busigroup\",device!~\"obsfs.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{path}} {{device}} {{__name__}}", + "range": true, + "refId": "C" + } + ], + "title": "$ident 磁盘空间", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "%util: 在统计时间内所有处理IO时间,除以总共统计时间。例如,如果统计间隔1秒,该设备有0.8秒在处理IO,而0.2秒闲置,那么该设备的%util = 0.8/1 = 80%,\n所以该参数暗示了设备的繁忙程度,一般地,如果该参数是100%表示磁盘设备已经接近满负荷运行了(当然如果是多磁盘,即使%util是100%,因为磁盘的并发能力,所以磁盘使用未必就到了瓶颈)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 9 + }, + "id": 47, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(diskio_io_time{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])/10", + "interval": "", + "legendFormat": "{{ident}} {{name}} io_util", + "refId": "A" + } + ], + "title": "$ident 磁盘繁忙度", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 磁盘IOPS", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "KiBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 9 + }, + "id": 23, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(diskio_reads{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])", + "interval": "", + "legendFormat": "{{ident}} {{name}} read", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(diskio_writes{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{name}} writes", + "refId": "B" + } + ], + "title": "$ident 磁盘IOPS", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 磁盘IO等待时间", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 15 + }, + "id": 60, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(diskio_write_time{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])/rate(diskio_writes{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])+rate(diskio_read_time{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])/rate(diskio_reads{ident=\"$ident\",busigroup=~\"$busigroup\",name=~\"v.*|s.*\"}[1m])", + "interval": "", + "legendFormat": "{{ident}} {{name}} iowait", + "refId": "A" + } + ], + "title": "$ident 磁盘IO等待时间", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 磁盘空间使用率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 15 + }, + "id": 83, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_used_percent{ident=\"$ident\",busigroup=~\"$busigroup\",device!~\"obsfs.*\"}", + "interval": "", + "legendFormat": "{{ident}} {{path}} {{__name__}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 磁盘空间使用率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident inode", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 15 + }, + "id": 84, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_inodes_total{ident=\"$ident\",busigroup=~\"$busigroup\",path!~\"/var.*\",device!~\"obsfs.*\"}", + "interval": "", + "legendFormat": "{{ident}} {{path}} {{__name__}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_inodes_used{ident=\"$ident\",busigroup=~\"$busigroup\",path!~\"/var.*\",device!~\"obsfs.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{path}} {{__name__}}", + "range": true, + "refId": "B" + } + ], + "title": "$ident inode", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident inode使用率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 21 + }, + "id": 85, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "disk_inodes_used{ident=\"$ident\",busigroup=~\"$busigroup\"}/disk_inodes_total{ident=\"$ident\",busigroup=~\"$busigroup\",device!~\"obsfs.*\"}", + "interval": "", + "legendFormat": "{{ident}} {{path}} inode_use_percent", + "range": true, + "refId": "A" + } + ], + "title": "$ident inode使用率", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 磁盘", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 82, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 网卡流量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 6 + }, + "id": 18, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(net_bytes_recv{ident=\"$ident\"}[1m])*8", + "interval": "", + "legendFormat": "{{ident}} {{interface}} recv", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(net_bytes_sent{ident=\"$ident\"}[1m])*8", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{interface}} sent", + "refId": "B" + } + ], + "title": "$ident 网卡流量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 网卡丢包数", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 6 + }, + "id": 89, + "links": [], + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(net_drop_in{ident=\"$ident\",busigroup=~\"$busigroup\"}[1m])", + "instant": true, + "interval": "", + "legendFormat": "{{ident}} {{interface}} recv", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(net_drop_out{ident=\"$ident\",busigroup=~\"$busigroup\"}[1m])", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{ident}} {{interface}} sent", + "refId": "B" + } + ], + "title": "$ident 网卡丢包数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 网卡错误数", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 6 + }, + "id": 90, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(net_err_in{ident=\"$ident\",busigroup=~\"$busigroup\"}[1m])", + "instant": true, + "interval": "", + "legendFormat": "{{ident}} {{interface}} in", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "rate(net_err_out{ident=\"$ident\",busigroup=~\"$busigroup\"}[1m])", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{ident}} {{interface}} out", + "refId": "B" + } + ], + "title": "$ident 网卡错误数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident TCP连接状态", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 13 + }, + "id": 102, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_tcp_established{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_tcp_listen{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_tcp_time_wait{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_tcp_closing{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "D" + } + ], + "title": "$ident TCP连接状态", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident UDP连接状态", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 13 + }, + "id": 103, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_udp_socket{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_udplite_inuse{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_udp_mem{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "netstat_udp_inuse{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "D" + } + ], + "title": "$ident UDP连接状态", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 网卡", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 104, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident ping丢包率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 7 + }, + "id": 22, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ping_percent_packet_loss{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident ping丢包率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident ping响应时间", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 7 + }, + "id": 97, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ping_average_response_ms{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident ping响应时间", + "type": "timeseries" + } + ], + "title": "$ident 网络", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 88, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 进程总数", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 8 + }, + "id": 91, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "processes_total{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + } + ], + "title": "$ident 进程总数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 僵尸进程数", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 8 + }, + "id": 92, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "processes_zombies{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}}", + "refId": "A" + } + ], + "title": "$ident 僵尸进程数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 进程所占CPU使用率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 8 + }, + "id": 95, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "procstat_cpu_usage_total{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}} {{search_string}}", + "refId": "A" + } + ], + "title": "$ident 进程所占CPU使用率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 进程所占内存使用率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 14 + }, + "id": 93, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "procstat_mem_usage_total{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "interval": "", + "legendFormat": "{{ident}} {{__name__}} {{search_string}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 进程所占内存使用率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 进程所占磁盘IO资源", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 14 + }, + "id": 96, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "procstat_write_bytes_total{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}} {{search_string}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "procstat_read_bytes_total{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}} {{search_string}}", + "refId": "A" + } + ], + "title": "$ident 进程所占磁盘IO资源", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 进程所占线程资源", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 14 + }, + "id": 94, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "procstat_num_threads_total{ident=\"$ident\",busigroup=~\"$busigroup\"}", + "hide": false, + "interval": "", + "legendFormat": "{{ident}} {{__name__}} {{search_string}}", + "refId": "B" + } + ], + "title": "$ident 进程所占线程资源", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 进程", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 101, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident NTP同步偏移量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 9 + }, + "id": 100, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ntp_offset_ms{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{__name__}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident NTP同步偏移量", + "type": "timeseries" + } + ], + "title": "$ident 时间同步", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 98, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 健康检测地址响应时间", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 10 + }, + "id": 99, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "http_response_response_time{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 健康检测地址响应时间", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident HTTP状态码", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 10 + }, + "id": 125, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "http_response_response_code{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident HTTP状态码", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "$ident 健康检测地址响应结果码", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 10 + }, + "id": 126, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "http_response_result_code{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{__name__}} {{target}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 健康检测地址响应结果码(0正1异)", + "type": "timeseries" + } + ], + "title": "$ident 健康检测", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 33, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "$ident 本机事件", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 106, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 12 + }, + "id": 109, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Processor\"})", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}} cpus_count", + "range": true, + "refId": "A" + } + ], + "title": "$ident 处理器数量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 110, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",name=~\"Status\",type=~\"Processor\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 处理器状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 12 + }, + "id": 112, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_temperature_state{ident=~\"$ident\",busigroup=~\"$busigroup\",name=~\"Temp\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 处理器温度状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 12 + }, + "id": 113, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_temperature_celsius{ident=~\"$ident\",busigroup=~\"$busigroup\",name=~\"Temp\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 处理器温度(摄氏度)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 18 + }, + "id": 111, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Memory\"})", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}} memory_count", + "range": true, + "refId": "A" + } + ], + "title": "$ident 内存条数量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 18 + }, + "id": 114, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Memory\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 内存条状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 18 + }, + "id": 115, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Drive Slot\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 磁盘状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 18 + }, + "id": 116, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Cable/Interconnect\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 线缆状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 24 + }, + "id": 117, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(ipmi_fan_speed_state{ident=~\"$ident\",busigroup=~\"$busigroup\"})", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}} fan_count", + "range": true, + "refId": "A" + } + ], + "title": "$ident 风扇数量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 24 + }, + "id": 127, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_fan_speed_state{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 风扇状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "rotrpm" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 24 + }, + "id": 118, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_fan_speed_rpm{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}} ", + "range": true, + "refId": "A" + } + ], + "title": "$ident 风扇转速(RPM)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 24 + }, + "id": 120, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Critical Interrupt\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 外部中断控制器状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 30 + }, + "id": 107, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",name=\"Status\",type=\"Power Supply\"})", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}} power_count", + "range": true, + "refId": "A" + } + ], + "title": "$ident 电源数量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "0表示正常,1表示异常,损坏1个能提供服务,损坏2个则表示整个模块不可用。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 30 + }, + "id": 108, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",name=\"Status\",type=\"Power Supply\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 电源状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 30 + }, + "id": 119, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=~\"Other Units Based Sensor\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 其他传感器状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 30 + }, + "id": 128, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_sensor_value{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 其他传感器状态值", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 36 + }, + "id": 121, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_sensor_state{ident=~\"$ident\",busigroup=~\"$busigroup\",type=\"Battery\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 电池状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 36 + }, + "id": 122, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_voltage_state{ident=~\"$ident\",busigroup=~\"$busigroup\",name=~\"Voltage.*\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 电压状态(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 36 + }, + "id": 123, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_voltage_volts{ident=~\"$ident\",busigroup=~\"$busigroup\",name=~\"Voltage.*\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 电压功率(0正1异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 36 + }, + "id": 124, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "ipmi_up{ident=~\"$ident\",busigroup=~\"$busigroup\",collector=~\"bmc\"}", + "instant": false, + "legendFormat": "{{ident}} {{collector}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident BMC状态(1正0异)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": true, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "linearThreshold": 1, + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "dashed" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 42 + }, + "id": 129, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "ipmi_power_watts{ident=~\"$ident\",busigroup=~\"$busigroup\"}", + "instant": false, + "legendFormat": "{{ident}} {{type}} {{id}} {{name}}", + "range": true, + "refId": "A" + } + ], + "title": "$ident 其他传感器状态(0正1异)", + "type": "timeseries" + } + ], + "title": "$ident 硬件信息(物理机)", + "type": "row" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "linux", + "system", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(system_load1{},busigroup)", + "hide": 0, + "includeAll": false, + "label": "业务组", + "multi": false, + "name": "busigroup", + "options": [], + "query": { + "query": "label_values(system_load1{},busigroup)", + "refId": "StandardVariableQuery", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + } + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(system_load1{busigroup=~\"$busigroup\"},ident)", + "hide": 0, + "includeAll": false, + "label": "主机名", + "multi": false, + "name": "ident", + "options": [], + "query": { + "query": "label_values(system_load1{busigroup=~\"$busigroup\"},ident)", + "refId": "StandardVariableQuery", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + } + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Categraf Linux Host Overview", + "uid": "categraf-linux-system", + "version": 1, + "weekStart": "" +} diff --git a/inputs/tomcat/dashboard_grafana.json b/inputs/tomcat/dashboard_grafana.json new file mode 100644 index 00000000..3c0d95e5 --- /dev/null +++ b/inputs/tomcat/dashboard_grafana.json @@ -0,0 +1,717 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "connector", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + } + }, + { + "id": 2, + "title": "Traffic Bytes / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(tomcat_connector_bytes_sent{instance=\"$instance\"}[1m])", + "legendFormat": "sent", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(tomcat_connector_bytes_received{instance=\"$instance\"}[1m])", + "legendFormat": "received", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 3, + "title": "Request count / Second", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(tomcat_connector_request_count{instance=\"$instance\"}[1m])", + "legendFormat": "tomcat_connector_request_count", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(tomcat_connector_error_count{instance=\"$instance\"}[1m])", + "legendFormat": "tomcat_connector_error_count", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "Tread", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_connector_max_threads{instance=\"$instance\"}", + "legendFormat": "max_threads", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_connector_current_thread_count{instance=\"$instance\"}", + "legendFormat": "current_thread_count", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_connector_current_threads_busy{instance=\"$instance\"}", + "legendFormat": "current_threads_busy", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Processing time", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 2 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(tomcat_connector_processing_time{instance=\"$instance\"}[1m])", + "legendFormat": "{{name}}-processing_time", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "mem used", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + } + }, + { + "id": 7, + "title": "Mem Used", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memory_max{instance=\"$instance\"}", + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memory_total{instance=\"$instance\"}", + "legendFormat": "used", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memory_free{instance=\"$instance\"}", + "legendFormat": "free", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 8, + "title": "memorypool", + "type": "row", + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 56 + } + }, + { + "id": 9, + "title": "Used", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 0, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memorypool_used{instance=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Max", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 6, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memorypool_max{instance=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "Committed", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memorypool_committed{instance=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Init", + "type": "timeseries", + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 0 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "tomcat_jvm_memorypool_init{instance=\"$instance\"}", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana", + "Categraf" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": false, + "label": "instance", + "multi": false, + "name": "instance", + "options": [], + "query": { + "query": "label_values(instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Tomcat - 模板", + "uid": "categraf-tomcat-dashboard-8abe3e54", + "version": 1, + "weekStart": "" +} diff --git a/inputs/vsphere/dashboard_grafana.json b/inputs/vsphere/dashboard_grafana.json new file mode 100644 index 00000000..214bacb2 --- /dev/null +++ b/inputs/vsphere/dashboard_grafana.json @@ -0,0 +1,1503 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "vSphere Overview", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Panel 2", + "type": "stat", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_host_cpu_usage_average) by(vcenter))", + "legendFormat": "vCenter Summary", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_host_cpu_usage_average) by(clustername))", + "legendFormat": "Cluster Summary", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_host_cpu_usage_average) by(esxhostname))", + "legendFormat": "ESXi Summary", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_vm_cpu_used_summation) by(vmname))", + "legendFormat": "VM Summary", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_datastore_disk_used_latest) by(dsname))", + "legendFormat": "Datastore Summary", + "range": true, + "refId": "E" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "EXSI cpu使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 3 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_usage_average{}) by(esxhostname)/count(vsphere_host_cpu_usage_average{}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 4, + "title": "EXSI mem使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 3 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_mem_usage_average{}) by(esxhostname)/count(vsphere_host_mem_usage_average{}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 5, + "title": "VM cpu使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_cpu_usage_average{}) by(vmname)/count(vsphere_vm_cpu_usage_average{}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 6, + "title": "VM mem使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_mem_usage_average{}) by(vmname)/count(vsphere_vm_mem_usage_average{}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 7, + "title": "Cluster Status", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "collapsed": false + }, + { + "id": 8, + "title": "uptime", + "type": "stat", + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_sys_uptime_latest{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername)/count(vsphere_host_sys_uptime_latest{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))/86500", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 9, + "title": "Cluster CPU Usage %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 4, + "x": 2, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername)/count(vsphere_host_cpu_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))", + "legendFormat": "{{clustername}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Cluster RAM Usage in %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 4, + "x": 6, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_mem_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername)/count(vsphere_host_mem_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))", + "legendFormat": "{{clustername}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "Cluster Network Usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesRx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))/1000 ", + "legendFormat": "{{clustername}}-net_bytesRx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesTx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))/1000", + "legendFormat": "{{clustername}}-net_bytesTx", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Panel 12", + "type": "table", + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(vsphere_datastore_disk_capacity_latest{vcenter=\"$vcenter\"}) by(source)", + "legendFormat": "总量", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(vsphere_datastore_disk_used_latest{vcenter=\"$vcenter\"}) by(source)", + "legendFormat": "使用量", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(vsphere_datastore_disk_used_latest{vcenter=\"$vcenter\"}/vsphere_datastore_disk_capacity_latest{vcenter=\"$vcenter\"}) by(source)*100", + "legendFormat": "使用率(%)", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 13, + "title": "Exsi status", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "collapsed": false + }, + { + "id": 14, + "title": "uptime\n", + "type": "stat", + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "vsphere_host_sys_uptime_latest{esxhostname=\"$esxi\"}", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 15, + "title": "Host CPU Ready Time", + "type": "stat", + "gridPos": { + "h": 5, + "w": 3, + "x": 2, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_ready_summation{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname)/count(vsphere_host_cpu_ready_summation{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname))", + "legendFormat": "cpu usage", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 16, + "title": "Host CPU Usage %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 5, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname)/count(vsphere_host_cpu_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 17, + "title": "Host RAM Usage in %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_mem_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname)/count(vsphere_host_mem_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 18, + "title": "Cluster Network Usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesRx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(esxhostname))/1000", + "legendFormat": "{{esxhostname}}-net_bytesRx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesTx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(esxhostname))/1000", + "legendFormat": "{{esxhostname}}-net_bytesTx", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 19, + "title": "VMs status", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "collapsed": false + }, + { + "id": 20, + "title": "uptime", + "type": "stat", + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "vsphere_vm_sys_uptime_latest{vmname=\"$vmname\"}", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 21, + "title": "VM CPU Ready Time", + "type": "stat", + "gridPos": { + "h": 5, + "w": 3, + "x": 2, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_cpu_ready_summation{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname)/count(vsphere_vm_cpu_ready_summation{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname))", + "legendFormat": "cpu usage", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 22, + "title": "VM CPU Usage %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 5, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_cpu_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname)/count(vsphere_vm_cpu_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 23, + "title": "VM RAM Usage in %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_mem_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname)/count(vsphere_vm_mem_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 24, + "title": "VMNetwork Usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_net_bytesRx_average{vmname=\"$vmname\",vcenter=\"$vcenter\"}) by(vmname))/1000", + "legendFormat": "{{vmname}}-net_bytesRx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_net_bytesTx_average{vmname=\"$vmname\",vcenter=\"$vcenter\"}) by(vmname))/1000", + "legendFormat": "{{vmname}}-net_bytesTx", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "vcenter", + "multi": false, + "name": "vcenter", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_host_cpu_usage_average", + "query": { + "query": "vsphere_host_cpu_usage_average", + "refId": "StandardVariableQuery" + }, + "regex": "/.*vcenter=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "Cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*clustername=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "esxi", + "multi": false, + "name": "esxi", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*esxhostname=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "vmname", + "multi": false, + "name": "vmname", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_vm_sys_uptime_latest{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_vm_sys_uptime_latest{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*vmname=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "datastore", + "multi": false, + "name": "datastore", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_datastore_disk_provisioned_latest{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_datastore_disk_provisioned_latest{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*dsname=\"(.*?)\".*/", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Vsphere (dashboard)", + "uid": "categraf-vsphere-dashboard-e75bfac8", + "version": 1, + "weekStart": "" +} diff --git a/inputs/vsphere/dashboards_grafana.json b/inputs/vsphere/dashboards_grafana.json new file mode 100644 index 00000000..3df4a672 --- /dev/null +++ b/inputs/vsphere/dashboards_grafana.json @@ -0,0 +1,1503 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "vSphere Overview", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Panel 2", + "type": "stat", + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_host_cpu_usage_average) by(vcenter))", + "legendFormat": "vCenter Summary", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_host_cpu_usage_average) by(clustername))", + "legendFormat": "Cluster Summary", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_host_cpu_usage_average) by(esxhostname))", + "legendFormat": "ESXi Summary", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_vm_cpu_used_summation) by(vmname))", + "legendFormat": "VM Summary", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "count(count(vsphere_datastore_disk_used_latest) by(dsname))", + "legendFormat": "Datastore Summary", + "range": true, + "refId": "E" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 3, + "title": "EXSI cpu使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 3 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_usage_average{}) by(esxhostname)/count(vsphere_host_cpu_usage_average{}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 4, + "title": "EXSI mem使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 3 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_mem_usage_average{}) by(esxhostname)/count(vsphere_host_mem_usage_average{}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 5, + "title": "VM cpu使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_cpu_usage_average{}) by(vmname)/count(vsphere_vm_cpu_usage_average{}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 6, + "title": "VM mem使用率排名", + "type": "bargauge", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 8 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_mem_usage_average{}) by(vmname)/count(vsphere_vm_mem_usage_average{}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + } + }, + { + "id": 7, + "title": "Cluster Status", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "collapsed": false + }, + { + "id": 8, + "title": "uptime", + "type": "stat", + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_sys_uptime_latest{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername)/count(vsphere_host_sys_uptime_latest{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))/86500", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 9, + "title": "Cluster CPU Usage %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 4, + "x": 2, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername)/count(vsphere_host_cpu_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))", + "legendFormat": "{{clustername}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Cluster RAM Usage in %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 4, + "x": 6, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_mem_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername)/count(vsphere_host_mem_usage_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))", + "legendFormat": "{{clustername}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "Cluster Network Usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesRx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))/1000 ", + "legendFormat": "{{clustername}}-net_bytesRx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesTx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(clustername))/1000", + "legendFormat": "{{clustername}}-net_bytesTx", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Panel 12", + "type": "table", + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 14 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(vsphere_datastore_disk_capacity_latest{vcenter=\"$vcenter\"}) by(source)", + "legendFormat": "总量", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(vsphere_datastore_disk_used_latest{vcenter=\"$vcenter\"}) by(source)", + "legendFormat": "使用量", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(vsphere_datastore_disk_used_latest{vcenter=\"$vcenter\"}/vsphere_datastore_disk_capacity_latest{vcenter=\"$vcenter\"}) by(source)*100", + "legendFormat": "使用率(%)", + "range": true, + "refId": "C" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 13, + "title": "Exsi status", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "collapsed": false + }, + { + "id": 14, + "title": "uptime\n", + "type": "stat", + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "vsphere_host_sys_uptime_latest{esxhostname=\"$esxi\"}", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 15, + "title": "Host CPU Ready Time", + "type": "stat", + "gridPos": { + "h": 5, + "w": 3, + "x": 2, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_ready_summation{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname)/count(vsphere_host_cpu_ready_summation{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname))", + "legendFormat": "cpu usage", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 16, + "title": "Host CPU Usage %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 5, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_cpu_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname)/count(vsphere_host_cpu_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 17, + "title": "Host RAM Usage in %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_mem_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname)/count(vsphere_host_mem_usage_average{vcenter=\"$vcenter\",esxhostname=\"$esxi\"}) by(esxhostname))", + "legendFormat": "{{esxhostname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 18, + "title": "Cluster Network Usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 20 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesRx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(esxhostname))/1000", + "legendFormat": "{{esxhostname}}-net_bytesRx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_host_net_bytesTx_average{clustername=\"$Cluster\",vcenter=\"$vcenter\"}) by(esxhostname))/1000", + "legendFormat": "{{esxhostname}}-net_bytesTx", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 19, + "title": "VMs status", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "collapsed": false + }, + { + "id": 20, + "title": "uptime", + "type": "stat", + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "vsphere_vm_sys_uptime_latest{vmname=\"$vmname\"}", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 21, + "title": "VM CPU Ready Time", + "type": "stat", + "gridPos": { + "h": 5, + "w": 3, + "x": 2, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_cpu_ready_summation{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname)/count(vsphere_vm_cpu_ready_summation{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname))", + "legendFormat": "cpu usage", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "ms", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "valueAndName" + } + }, + { + "id": 22, + "title": "VM CPU Usage %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 5, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_cpu_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname)/count(vsphere_vm_cpu_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 23, + "title": "VM RAM Usage in %", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 5, + "x": 10, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_mem_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname)/count(vsphere_vm_mem_usage_average{vcenter=\"$vcenter\",vmname=\"$vmname\"}) by(vmname))", + "legendFormat": "{{vmname}}", + "range": true, + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 24, + "title": "VMNetwork Usage", + "type": "timeseries", + "gridPos": { + "h": 5, + "w": 9, + "x": 15, + "y": 26 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_net_bytesRx_average{vmname=\"$vmname\",vcenter=\"$vcenter\"}) by(vmname))/1000", + "legendFormat": "{{vmname}}-net_bytesRx", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(sum(vsphere_vm_net_bytesTx_average{vmname=\"$vmname\",vcenter=\"$vcenter\"}) by(vmname))/1000", + "legendFormat": "{{vmname}}-net_bytesTx", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "vcenter", + "multi": false, + "name": "vcenter", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_host_cpu_usage_average", + "query": { + "query": "vsphere_host_cpu_usage_average", + "refId": "StandardVariableQuery" + }, + "regex": "/.*vcenter=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "Cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*clustername=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "esxi", + "multi": false, + "name": "esxi", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_host_cpu_usage_average{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*esxhostname=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "vmname", + "multi": false, + "name": "vmname", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_vm_sys_uptime_latest{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_vm_sys_uptime_latest{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*vmname=\"(.*?)\".*/", + "sort": 0 + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "datastore", + "multi": false, + "name": "datastore", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "vsphere_datastore_disk_provisioned_latest{vcenter=\"$vcenter\"}", + "query": { + "query": "vsphere_datastore_disk_provisioned_latest{vcenter=\"$vcenter\"}", + "refId": "StandardVariableQuery" + }, + "regex": "/.*dsname=\"(.*?)\".*/", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Vsphere (dashboards)", + "uid": "categraf-vsphere-dashboards-029d72fe", + "version": 1, + "weekStart": "" +} diff --git a/inputs/zookeeper/dashboard_grafana.json b/inputs/zookeeper/dashboard_grafana.json new file mode 100644 index 00000000..67595715 --- /dev/null +++ b/inputs/zookeeper/dashboard_grafana.json @@ -0,0 +1,967 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "id": 1, + "title": "分组", + "type": "row", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "collapsed": false + }, + { + "id": 2, + "title": "Status", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_up{zk_cluster=\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 3, + "title": "Is Leader", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_server_leader{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{zk_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 4, + "title": "Ephemerals Count", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_ephemerals_count{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{zk_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 5, + "title": "Znode Count", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_znode_count{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{zk_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 6, + "title": "Watch Count", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_watch_count{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{zk_host}}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 7, + "title": "Version", + "type": "table", + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 1 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_version{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": [ + "sum" + ], + "countRows": false, + "fields": "" + } + } + }, + { + "id": 8, + "title": "Pakages Sent", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(zk_packets_sent{zk_cluster=~\"$zk_cluster\"}[5m])", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 9, + "title": "Pakages Recieved", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 5 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(zk_packets_received{zk_cluster=~\"$zk_cluster\"}[5m])", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 10, + "title": "Alive Connections", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_num_alive_connections{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 11, + "title": "File Descriptors", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 9 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_open_file_descriptor_count{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 12, + "title": "Avg Latency", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_avg_latency{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "s", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 13, + "title": "Min Latency(seconds)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_min_latency{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 14, + "title": "Max Latency(seconds)", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 13 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_max_latency{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 15, + "title": "Outstanding Requests", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_outstanding_requests{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + }, + { + "id": 16, + "title": "Approx Data Size", + "type": "timeseries", + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 17 + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "zk_approximate_data_size{zk_cluster=~\"$zk_cluster\"}", + "legendFormat": "{{ zk_host }}", + "range": true, + "refId": "A" + } + ], + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + } + } + ], + "refresh": "30s", + "schemaVersion": 38, + "tags": [ + "categraf", + "grafana" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "hide": 0, + "includeAll": false, + "label": "zk_cluster", + "multi": false, + "name": "zk_cluster", + "options": [], + "refresh": 2, + "skipUrlSync": false, + "type": "query", + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(zk_up,zk_cluster)", + "query": { + "query": "label_values(zk_up,zk_cluster)", + "refId": "StandardVariableQuery" + }, + "regex": "", + "sort": 0 + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Zookeeper", + "uid": "categraf-zookeeper-dashboard-ac9e1afd", + "version": 1, + "weekStart": "" +}