From 81dbef313d127fac5aaafbb462c56edfa55ba3ce Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Mon, 16 Mar 2026 23:58:18 +0800 Subject: [PATCH] Reorganize Grafana dashboards by platform domain --- .../{node => 01-iaas-compute}/node-alert.json | 0 .../node-cluster.json | 0 .../node-instance.json | 0 .../node-overview.json | 0 files/grafana/{ => 01-iaas-compute}/node.json | 0 .../minio-instance.json | 0 .../minio-overview.json | 0 .../{node => 02-iaas-storage}/node-disk.json | 0 .../{node => 02-iaas-storage}/node-juice.json | 0 .../{node => 03-iaas-network}/node-vip.json | 0 .../alertmanager-instance.json | 0 .../etcd-overview.json | 0 .../grafana-instance.json | 0 .../infra-overview.json | 0 .../inventory-cmdb.json | 0 .../{ => 11-paas-control-plane}/pigsty.json | 0 .../vlogs-instance.json | 0 .../vmalert-instance.json | 0 .../vmetrics-instance.json | 0 .../vtraces-instance.json | 0 files/grafana/{ => 12-paas-cluster}/k8s.json | 0 .../{mongo => 13-paas-db}/mongo-overview.json | 0 .../{pgsql => 13-paas-db}/pgcat-database.json | 0 .../{pgsql => 13-paas-db}/pgcat-instance.json | 0 .../{pgsql => 13-paas-db}/pgcat-locks.json | 0 .../{pgsql => 13-paas-db}/pgcat-query.json | 0 .../{pgsql => 13-paas-db}/pgcat-schema.json | 0 .../{pgsql => 13-paas-db}/pgcat-table.json | 0 .../{pgsql => 13-paas-db}/pgrds-cluster.json | 0 .../{pgsql => 13-paas-db}/pgrds-instance.json | 0 .../{pgsql => 13-paas-db}/pgsql-activity.json | 0 .../{pgsql => 13-paas-db}/pgsql-alert.json | 0 .../{pgsql => 13-paas-db}/pgsql-cluster.json | 0 .../{pgsql => 13-paas-db}/pgsql-database.json | 0 .../pgsql-databases.json | 0 .../{pgsql => 13-paas-db}/pgsql-exporter.json | 0 .../{pgsql => 13-paas-db}/pgsql-instance.json | 0 .../{pgsql => 13-paas-db}/pgsql-overview.json | 0 .../{pgsql => 13-paas-db}/pgsql-patroni.json | 0 .../{pgsql => 13-paas-db}/pgsql-persist.json | 0 .../pgsql-pgbouncer.json | 0 .../{pgsql => 13-paas-db}/pgsql-pitr.json | 0 .../{pgsql => 13-paas-db}/pgsql-proxy.json | 0 .../{pgsql => 13-paas-db}/pgsql-query.json | 0 .../pgsql-replication.json | 0 .../{pgsql => 13-paas-db}/pgsql-service.json | 0 .../{pgsql => 13-paas-db}/pgsql-session.json | 0 .../{pgsql => 13-paas-db}/pgsql-shard.json | 0 .../{pgsql => 13-paas-db}/pgsql-table.json | 0 .../{pgsql => 13-paas-db}/pgsql-tables.json | 0 .../{pgsql => 13-paas-db}/pgsql-xacts.json | 0 .../redis-cluster.json | 0 .../redis-instance.json | 0 .../redis-overview.json | 0 .../nginx-instance.json | 0 .../{node => 22-bu-proxy}/node-haproxy.json | 0 .../{node => 24-bu-request}/claude-code.json | 0 .../logs-instance.json | 0 .../{node => 24-bu-request}/node-vector.json | 0 .../pglog-overview.json | 0 .../{app => 24-bu-request}/pglog-session.json | 0 files/grafana/README.md | 29 +- files/grafana/grafana.py | 66 +- files/grafana/homepage.json | 13207 +--------------- merge_dashboards.py | 462 +- 65 files changed, 788 insertions(+), 12976 deletions(-) rename files/grafana/{node => 01-iaas-compute}/node-alert.json (100%) rename files/grafana/{node => 01-iaas-compute}/node-cluster.json (100%) rename files/grafana/{node => 01-iaas-compute}/node-instance.json (100%) rename files/grafana/{node => 01-iaas-compute}/node-overview.json (100%) rename files/grafana/{ => 01-iaas-compute}/node.json (100%) rename files/grafana/{minio => 02-iaas-storage}/minio-instance.json (100%) rename files/grafana/{minio => 02-iaas-storage}/minio-overview.json (100%) rename files/grafana/{node => 02-iaas-storage}/node-disk.json (100%) rename files/grafana/{node => 02-iaas-storage}/node-juice.json (100%) rename files/grafana/{node => 03-iaas-network}/node-vip.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/alertmanager-instance.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/etcd-overview.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/grafana-instance.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/infra-overview.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/inventory-cmdb.json (100%) rename files/grafana/{ => 11-paas-control-plane}/pigsty.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/vlogs-instance.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/vmalert-instance.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/vmetrics-instance.json (100%) rename files/grafana/{infra => 11-paas-control-plane}/vtraces-instance.json (100%) rename files/grafana/{ => 12-paas-cluster}/k8s.json (100%) rename files/grafana/{mongo => 13-paas-db}/mongo-overview.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgcat-database.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgcat-instance.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgcat-locks.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgcat-query.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgcat-schema.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgcat-table.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgrds-cluster.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgrds-instance.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-activity.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-alert.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-cluster.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-database.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-databases.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-exporter.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-instance.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-overview.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-patroni.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-persist.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-pgbouncer.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-pitr.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-proxy.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-query.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-replication.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-service.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-session.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-shard.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-table.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-tables.json (100%) rename files/grafana/{pgsql => 13-paas-db}/pgsql-xacts.json (100%) rename files/grafana/{redis => 14-paas-cache}/redis-cluster.json (100%) rename files/grafana/{redis => 14-paas-cache}/redis-instance.json (100%) rename files/grafana/{redis => 14-paas-cache}/redis-overview.json (100%) rename files/grafana/{infra => 22-bu-proxy}/nginx-instance.json (100%) rename files/grafana/{node => 22-bu-proxy}/node-haproxy.json (100%) rename files/grafana/{node => 24-bu-request}/claude-code.json (100%) rename files/grafana/{infra => 24-bu-request}/logs-instance.json (100%) rename files/grafana/{node => 24-bu-request}/node-vector.json (100%) rename files/grafana/{app => 24-bu-request}/pglog-overview.json (100%) rename files/grafana/{app => 24-bu-request}/pglog-session.json (100%) mode change 100755 => 100644 merge_dashboards.py diff --git a/files/grafana/node/node-alert.json b/files/grafana/01-iaas-compute/node-alert.json similarity index 100% rename from files/grafana/node/node-alert.json rename to files/grafana/01-iaas-compute/node-alert.json diff --git a/files/grafana/node/node-cluster.json b/files/grafana/01-iaas-compute/node-cluster.json similarity index 100% rename from files/grafana/node/node-cluster.json rename to files/grafana/01-iaas-compute/node-cluster.json diff --git a/files/grafana/node/node-instance.json b/files/grafana/01-iaas-compute/node-instance.json similarity index 100% rename from files/grafana/node/node-instance.json rename to files/grafana/01-iaas-compute/node-instance.json diff --git a/files/grafana/node/node-overview.json b/files/grafana/01-iaas-compute/node-overview.json similarity index 100% rename from files/grafana/node/node-overview.json rename to files/grafana/01-iaas-compute/node-overview.json diff --git a/files/grafana/node.json b/files/grafana/01-iaas-compute/node.json similarity index 100% rename from files/grafana/node.json rename to files/grafana/01-iaas-compute/node.json diff --git a/files/grafana/minio/minio-instance.json b/files/grafana/02-iaas-storage/minio-instance.json similarity index 100% rename from files/grafana/minio/minio-instance.json rename to files/grafana/02-iaas-storage/minio-instance.json diff --git a/files/grafana/minio/minio-overview.json b/files/grafana/02-iaas-storage/minio-overview.json similarity index 100% rename from files/grafana/minio/minio-overview.json rename to files/grafana/02-iaas-storage/minio-overview.json diff --git a/files/grafana/node/node-disk.json b/files/grafana/02-iaas-storage/node-disk.json similarity index 100% rename from files/grafana/node/node-disk.json rename to files/grafana/02-iaas-storage/node-disk.json diff --git a/files/grafana/node/node-juice.json b/files/grafana/02-iaas-storage/node-juice.json similarity index 100% rename from files/grafana/node/node-juice.json rename to files/grafana/02-iaas-storage/node-juice.json diff --git a/files/grafana/node/node-vip.json b/files/grafana/03-iaas-network/node-vip.json similarity index 100% rename from files/grafana/node/node-vip.json rename to files/grafana/03-iaas-network/node-vip.json diff --git a/files/grafana/infra/alertmanager-instance.json b/files/grafana/11-paas-control-plane/alertmanager-instance.json similarity index 100% rename from files/grafana/infra/alertmanager-instance.json rename to files/grafana/11-paas-control-plane/alertmanager-instance.json diff --git a/files/grafana/infra/etcd-overview.json b/files/grafana/11-paas-control-plane/etcd-overview.json similarity index 100% rename from files/grafana/infra/etcd-overview.json rename to files/grafana/11-paas-control-plane/etcd-overview.json diff --git a/files/grafana/infra/grafana-instance.json b/files/grafana/11-paas-control-plane/grafana-instance.json similarity index 100% rename from files/grafana/infra/grafana-instance.json rename to files/grafana/11-paas-control-plane/grafana-instance.json diff --git a/files/grafana/infra/infra-overview.json b/files/grafana/11-paas-control-plane/infra-overview.json similarity index 100% rename from files/grafana/infra/infra-overview.json rename to files/grafana/11-paas-control-plane/infra-overview.json diff --git a/files/grafana/infra/inventory-cmdb.json b/files/grafana/11-paas-control-plane/inventory-cmdb.json similarity index 100% rename from files/grafana/infra/inventory-cmdb.json rename to files/grafana/11-paas-control-plane/inventory-cmdb.json diff --git a/files/grafana/pigsty.json b/files/grafana/11-paas-control-plane/pigsty.json similarity index 100% rename from files/grafana/pigsty.json rename to files/grafana/11-paas-control-plane/pigsty.json diff --git a/files/grafana/infra/vlogs-instance.json b/files/grafana/11-paas-control-plane/vlogs-instance.json similarity index 100% rename from files/grafana/infra/vlogs-instance.json rename to files/grafana/11-paas-control-plane/vlogs-instance.json diff --git a/files/grafana/infra/vmalert-instance.json b/files/grafana/11-paas-control-plane/vmalert-instance.json similarity index 100% rename from files/grafana/infra/vmalert-instance.json rename to files/grafana/11-paas-control-plane/vmalert-instance.json diff --git a/files/grafana/infra/vmetrics-instance.json b/files/grafana/11-paas-control-plane/vmetrics-instance.json similarity index 100% rename from files/grafana/infra/vmetrics-instance.json rename to files/grafana/11-paas-control-plane/vmetrics-instance.json diff --git a/files/grafana/infra/vtraces-instance.json b/files/grafana/11-paas-control-plane/vtraces-instance.json similarity index 100% rename from files/grafana/infra/vtraces-instance.json rename to files/grafana/11-paas-control-plane/vtraces-instance.json diff --git a/files/grafana/k8s.json b/files/grafana/12-paas-cluster/k8s.json similarity index 100% rename from files/grafana/k8s.json rename to files/grafana/12-paas-cluster/k8s.json diff --git a/files/grafana/mongo/mongo-overview.json b/files/grafana/13-paas-db/mongo-overview.json similarity index 100% rename from files/grafana/mongo/mongo-overview.json rename to files/grafana/13-paas-db/mongo-overview.json diff --git a/files/grafana/pgsql/pgcat-database.json b/files/grafana/13-paas-db/pgcat-database.json similarity index 100% rename from files/grafana/pgsql/pgcat-database.json rename to files/grafana/13-paas-db/pgcat-database.json diff --git a/files/grafana/pgsql/pgcat-instance.json b/files/grafana/13-paas-db/pgcat-instance.json similarity index 100% rename from files/grafana/pgsql/pgcat-instance.json rename to files/grafana/13-paas-db/pgcat-instance.json diff --git a/files/grafana/pgsql/pgcat-locks.json b/files/grafana/13-paas-db/pgcat-locks.json similarity index 100% rename from files/grafana/pgsql/pgcat-locks.json rename to files/grafana/13-paas-db/pgcat-locks.json diff --git a/files/grafana/pgsql/pgcat-query.json b/files/grafana/13-paas-db/pgcat-query.json similarity index 100% rename from files/grafana/pgsql/pgcat-query.json rename to files/grafana/13-paas-db/pgcat-query.json diff --git a/files/grafana/pgsql/pgcat-schema.json b/files/grafana/13-paas-db/pgcat-schema.json similarity index 100% rename from files/grafana/pgsql/pgcat-schema.json rename to files/grafana/13-paas-db/pgcat-schema.json diff --git a/files/grafana/pgsql/pgcat-table.json b/files/grafana/13-paas-db/pgcat-table.json similarity index 100% rename from files/grafana/pgsql/pgcat-table.json rename to files/grafana/13-paas-db/pgcat-table.json diff --git a/files/grafana/pgsql/pgrds-cluster.json b/files/grafana/13-paas-db/pgrds-cluster.json similarity index 100% rename from files/grafana/pgsql/pgrds-cluster.json rename to files/grafana/13-paas-db/pgrds-cluster.json diff --git a/files/grafana/pgsql/pgrds-instance.json b/files/grafana/13-paas-db/pgrds-instance.json similarity index 100% rename from files/grafana/pgsql/pgrds-instance.json rename to files/grafana/13-paas-db/pgrds-instance.json diff --git a/files/grafana/pgsql/pgsql-activity.json b/files/grafana/13-paas-db/pgsql-activity.json similarity index 100% rename from files/grafana/pgsql/pgsql-activity.json rename to files/grafana/13-paas-db/pgsql-activity.json diff --git a/files/grafana/pgsql/pgsql-alert.json b/files/grafana/13-paas-db/pgsql-alert.json similarity index 100% rename from files/grafana/pgsql/pgsql-alert.json rename to files/grafana/13-paas-db/pgsql-alert.json diff --git a/files/grafana/pgsql/pgsql-cluster.json b/files/grafana/13-paas-db/pgsql-cluster.json similarity index 100% rename from files/grafana/pgsql/pgsql-cluster.json rename to files/grafana/13-paas-db/pgsql-cluster.json diff --git a/files/grafana/pgsql/pgsql-database.json b/files/grafana/13-paas-db/pgsql-database.json similarity index 100% rename from files/grafana/pgsql/pgsql-database.json rename to files/grafana/13-paas-db/pgsql-database.json diff --git a/files/grafana/pgsql/pgsql-databases.json b/files/grafana/13-paas-db/pgsql-databases.json similarity index 100% rename from files/grafana/pgsql/pgsql-databases.json rename to files/grafana/13-paas-db/pgsql-databases.json diff --git a/files/grafana/pgsql/pgsql-exporter.json b/files/grafana/13-paas-db/pgsql-exporter.json similarity index 100% rename from files/grafana/pgsql/pgsql-exporter.json rename to files/grafana/13-paas-db/pgsql-exporter.json diff --git a/files/grafana/pgsql/pgsql-instance.json b/files/grafana/13-paas-db/pgsql-instance.json similarity index 100% rename from files/grafana/pgsql/pgsql-instance.json rename to files/grafana/13-paas-db/pgsql-instance.json diff --git a/files/grafana/pgsql/pgsql-overview.json b/files/grafana/13-paas-db/pgsql-overview.json similarity index 100% rename from files/grafana/pgsql/pgsql-overview.json rename to files/grafana/13-paas-db/pgsql-overview.json diff --git a/files/grafana/pgsql/pgsql-patroni.json b/files/grafana/13-paas-db/pgsql-patroni.json similarity index 100% rename from files/grafana/pgsql/pgsql-patroni.json rename to files/grafana/13-paas-db/pgsql-patroni.json diff --git a/files/grafana/pgsql/pgsql-persist.json b/files/grafana/13-paas-db/pgsql-persist.json similarity index 100% rename from files/grafana/pgsql/pgsql-persist.json rename to files/grafana/13-paas-db/pgsql-persist.json diff --git a/files/grafana/pgsql/pgsql-pgbouncer.json b/files/grafana/13-paas-db/pgsql-pgbouncer.json similarity index 100% rename from files/grafana/pgsql/pgsql-pgbouncer.json rename to files/grafana/13-paas-db/pgsql-pgbouncer.json diff --git a/files/grafana/pgsql/pgsql-pitr.json b/files/grafana/13-paas-db/pgsql-pitr.json similarity index 100% rename from files/grafana/pgsql/pgsql-pitr.json rename to files/grafana/13-paas-db/pgsql-pitr.json diff --git a/files/grafana/pgsql/pgsql-proxy.json b/files/grafana/13-paas-db/pgsql-proxy.json similarity index 100% rename from files/grafana/pgsql/pgsql-proxy.json rename to files/grafana/13-paas-db/pgsql-proxy.json diff --git a/files/grafana/pgsql/pgsql-query.json b/files/grafana/13-paas-db/pgsql-query.json similarity index 100% rename from files/grafana/pgsql/pgsql-query.json rename to files/grafana/13-paas-db/pgsql-query.json diff --git a/files/grafana/pgsql/pgsql-replication.json b/files/grafana/13-paas-db/pgsql-replication.json similarity index 100% rename from files/grafana/pgsql/pgsql-replication.json rename to files/grafana/13-paas-db/pgsql-replication.json diff --git a/files/grafana/pgsql/pgsql-service.json b/files/grafana/13-paas-db/pgsql-service.json similarity index 100% rename from files/grafana/pgsql/pgsql-service.json rename to files/grafana/13-paas-db/pgsql-service.json diff --git a/files/grafana/pgsql/pgsql-session.json b/files/grafana/13-paas-db/pgsql-session.json similarity index 100% rename from files/grafana/pgsql/pgsql-session.json rename to files/grafana/13-paas-db/pgsql-session.json diff --git a/files/grafana/pgsql/pgsql-shard.json b/files/grafana/13-paas-db/pgsql-shard.json similarity index 100% rename from files/grafana/pgsql/pgsql-shard.json rename to files/grafana/13-paas-db/pgsql-shard.json diff --git a/files/grafana/pgsql/pgsql-table.json b/files/grafana/13-paas-db/pgsql-table.json similarity index 100% rename from files/grafana/pgsql/pgsql-table.json rename to files/grafana/13-paas-db/pgsql-table.json diff --git a/files/grafana/pgsql/pgsql-tables.json b/files/grafana/13-paas-db/pgsql-tables.json similarity index 100% rename from files/grafana/pgsql/pgsql-tables.json rename to files/grafana/13-paas-db/pgsql-tables.json diff --git a/files/grafana/pgsql/pgsql-xacts.json b/files/grafana/13-paas-db/pgsql-xacts.json similarity index 100% rename from files/grafana/pgsql/pgsql-xacts.json rename to files/grafana/13-paas-db/pgsql-xacts.json diff --git a/files/grafana/redis/redis-cluster.json b/files/grafana/14-paas-cache/redis-cluster.json similarity index 100% rename from files/grafana/redis/redis-cluster.json rename to files/grafana/14-paas-cache/redis-cluster.json diff --git a/files/grafana/redis/redis-instance.json b/files/grafana/14-paas-cache/redis-instance.json similarity index 100% rename from files/grafana/redis/redis-instance.json rename to files/grafana/14-paas-cache/redis-instance.json diff --git a/files/grafana/redis/redis-overview.json b/files/grafana/14-paas-cache/redis-overview.json similarity index 100% rename from files/grafana/redis/redis-overview.json rename to files/grafana/14-paas-cache/redis-overview.json diff --git a/files/grafana/infra/nginx-instance.json b/files/grafana/22-bu-proxy/nginx-instance.json similarity index 100% rename from files/grafana/infra/nginx-instance.json rename to files/grafana/22-bu-proxy/nginx-instance.json diff --git a/files/grafana/node/node-haproxy.json b/files/grafana/22-bu-proxy/node-haproxy.json similarity index 100% rename from files/grafana/node/node-haproxy.json rename to files/grafana/22-bu-proxy/node-haproxy.json diff --git a/files/grafana/node/claude-code.json b/files/grafana/24-bu-request/claude-code.json similarity index 100% rename from files/grafana/node/claude-code.json rename to files/grafana/24-bu-request/claude-code.json diff --git a/files/grafana/infra/logs-instance.json b/files/grafana/24-bu-request/logs-instance.json similarity index 100% rename from files/grafana/infra/logs-instance.json rename to files/grafana/24-bu-request/logs-instance.json diff --git a/files/grafana/node/node-vector.json b/files/grafana/24-bu-request/node-vector.json similarity index 100% rename from files/grafana/node/node-vector.json rename to files/grafana/24-bu-request/node-vector.json diff --git a/files/grafana/app/pglog-overview.json b/files/grafana/24-bu-request/pglog-overview.json similarity index 100% rename from files/grafana/app/pglog-overview.json rename to files/grafana/24-bu-request/pglog-overview.json diff --git a/files/grafana/app/pglog-session.json b/files/grafana/24-bu-request/pglog-session.json similarity index 100% rename from files/grafana/app/pglog-session.json rename to files/grafana/24-bu-request/pglog-session.json diff --git a/files/grafana/README.md b/files/grafana/README.md index c5c57be..5210328 100644 --- a/files/grafana/README.md +++ b/files/grafana/README.md @@ -1,28 +1,31 @@ # Grafana Dashboards -This directory contains Grafana dashboard definitions for Pigsty monitoring system. +This directory contains Grafana dashboard definitions for the observability stack. ## Overview -Pigsty provides **57 built-in dashboards** organized by module: +The repository currently provides **61 domain dashboards + 1 homepage dashboard**. +Dashboards are organized by platform-engineering resource domains: -| Directory | Count | Description | -|-----------------|-------|-------------------------------------------------------------------------| -| [pgsql](pgsql/) | 29 | PostgreSQL cluster, instance, database, and query monitoring | -| [infra](infra/) | 11 | Infrastructure components (VictoriaMetrics, Grafana, Nginx, etcd, etc.) | -| [node](node/) | 8 | Host-level metrics (CPU, memory, disk, network, HAProxy, VIP) | -| [redis](redis/) | 3 | Redis cluster and instance monitoring | -| [app](app/) | 2 | Application dashboards (PostgreSQL logs analysis) | -| [minio](minio/) | 2 | MinIO S3-compatible storage monitoring | -| [mongo](mongo/) | 1 | MongoDB/FerretDB monitoring | -| - | 1 | [pigsty.json](pigsty.json) - Main home dashboard | +| Folder | Count | Description | +|--------|-------|-------------| +| [01-iaas-compute](01-iaas-compute/) | 5 | IAAS compute: node overview, cluster, instance, alert, compatibility summary | +| [02-iaas-storage](02-iaas-storage/) | 4 | IAAS storage: disk, JuiceFS, MinIO overview and instance | +| [03-iaas-network](03-iaas-network/) | 1 | IAAS network: VIP and node-network entry | +| [11-paas-control-plane](11-paas-control-plane/) | 10 | PaaS control plane: Pigsty, Grafana, Victoria stack, Alertmanager, etcd, CMDB | +| [12-paas-cluster](12-paas-cluster/) | 1 | PaaS cluster: Kubernetes overview | +| [13-paas-db](13-paas-db/) | 29 | PaaS DB: PostgreSQL, PGRDS, PGCAT, Mongo/FerretDB | +| [14-paas-cache](14-paas-cache/) | 3 | PaaS cache: Redis overview, cluster, instance | +| [22-bu-proxy](22-bu-proxy/) | 2 | Business unit proxy: Nginx and HAProxy | +| [24-bu-request](24-bu-request/) | 5 | Business unit request: logs, sessions, vector, request-side tooling | +| - | 1 | [homepage.json](homepage.json) - Platform engineering entry dashboard | ## Dashboard Catalog ### Home -- **[pigsty.json](pigsty.json)** - Pigsty home dashboard with global overview +- **[homepage.json](homepage.json)** - Platform engineering entry dashboard with domain summaries and navigation ### PGSQL Dashboards diff --git a/files/grafana/grafana.py b/files/grafana/grafana.py index abcdebf..7bffd02 100755 --- a/files/grafana/grafana.py +++ b/files/grafana/grafana.py @@ -16,6 +16,38 @@ USERNAME = os.environ.get("GRAFANA_USERNAME", 'admin') PASSWORD = os.environ.get("GRAFANA_PASSWORD", 'pigsty') CREATE_FOLDERS = True +FOLDER_TITLES = { + '01-iaas-compute': 'IAAS / 计算', + '02-iaas-storage': 'IAAS / 存储', + '03-iaas-network': 'IAAS / 网络', + '11-paas-control-plane': 'PaaS / 平台控制面', + '12-paas-cluster': 'PaaS / 集群', + '13-paas-db': 'PaaS / DB', + '14-paas-cache': 'PaaS / 缓存', + '15-paas-queue': 'PaaS / 队列', + '21-bu-dns': '业务单元 / DNS', + '22-bu-proxy': '业务单元 / 代理', + '23-bu-gateway': '业务单元 / 网关', + '24-bu-request': '业务单元 / 请求', + '25-bu-throughput': '业务单元 / 吞吐', +} + +FOLDER_TAGS = { + '01-iaas-compute': ['IAAS', 'IAAS-COMPUTE'], + '02-iaas-storage': ['IAAS', 'IAAS-STORAGE'], + '03-iaas-network': ['IAAS', 'IAAS-NETWORK'], + '11-paas-control-plane': ['PAAS', 'PAAS-CONTROL-PLANE'], + '12-paas-cluster': ['PAAS', 'PAAS-CLUSTER'], + '13-paas-db': ['PAAS', 'PAAS-DB'], + '14-paas-cache': ['PAAS', 'PAAS-CACHE'], + '15-paas-queue': ['PAAS', 'PAAS-QUEUE'], + '21-bu-dns': ['BU', 'BU-DNS'], + '22-bu-proxy': ['BU', 'BU-PROXY'], + '23-bu-gateway': ['BU', 'BU-GATEWAY'], + '24-bu-request': ['BU', 'BU-REQUEST'], + '25-bu-throughput': ['BU', 'BU-THROUGHPUT'], +} + METADB_PASSWORD = 'DBUser.Viewer' DEFAULT_DATASOURCES = { 'ds-prometheus': {'uid': 'ds-prometheus', 'orgId': 1, 'name': 'Prometheus', 'type': 'prometheus', 'typeName': 'Prometheus', 'typeLogoUrl': 'public/app/plugins/datasource/prometheus/img/prometheus_logo.svg', 'access': 'proxy', @@ -118,7 +150,7 @@ def add_folder(uid, title=""): if not CREATE_FOLDERS: return if title == "": - title = uid.upper() + title = resolve_folder_title(uid) post('folders', {"uid": uid, "title": title}) return put('folders/%s' % uid, {"title": title, "overwrite": True}) @@ -212,6 +244,30 @@ def load_dashboard(path, substitute=False): else: return json.load(open(path)) + +def resolve_folder_title(uid): + return FOLDER_TITLES.get(uid, uid.upper()) + + +def enrich_dashboard(dashboard, folder=None): + if not folder: + return dashboard + extra_tags = FOLDER_TAGS.get(folder, []) + if not extra_tags: + return dashboard + existing_tags = dashboard.get("tags", []) + if not isinstance(existing_tags, list): + existing_tags = [] + merged_tags = [] + seen = set() + for tag in existing_tags + extra_tags: + if not tag or tag in seen: + continue + seen.add(tag) + merged_tags.append(tag) + dashboard["tags"] = merged_tags + return dashboard + # json serializer: use compact_json if available, fallback to standard json try: from compact_json import Formatter @@ -283,13 +339,13 @@ def init_all(dashboard_dir): # load other second-layer dashboards for folder_name, folder_path in folders: print("init folder %s" % folder_name) - add_folder(folder_name, folder_name.upper()) + add_folder(folder_name, resolve_folder_title(folder_name)) for f in os.listdir(folder_path): abs_path = os.path.join(dashboard_dir, folder_name, f) if os.path.isfile(abs_path) and f.endswith('.json') and not f.startswith('.'): print("init dashboard: %s / %s" % (folder_name, f)) - add_dashboard(load_dashboard(abs_path, True), folder_name) + add_dashboard(enrich_dashboard(load_dashboard(abs_path, True), folder_name), folder_name) def load_all(dashboard_dir): @@ -305,13 +361,13 @@ def load_all(dashboard_dir): for folder_name, folder_path in folders: print("add folder %s" % folder_name) - add_folder(folder_name, folder_name.upper()) + add_folder(folder_name, resolve_folder_title(folder_name)) for f in os.listdir(folder_path): abs_path = os.path.join(dashboard_dir, folder_name, f) if os.path.isfile(abs_path) and f.endswith('.json') and not f.startswith('.'): print("load dashboard: %s / %s" % (folder_name, f)) - add_dashboard(load_dashboard(abs_path), folder_name) + add_dashboard(enrich_dashboard(load_dashboard(abs_path), folder_name), folder_name) def dump_all(dashboard_dir): diff --git a/files/grafana/homepage.json b/files/grafana/homepage.json index ca18795..61ff255 100644 --- a/files/grafana/homepage.json +++ b/files/grafana/homepage.json @@ -21,7 +21,7 @@ } ] }, - "description": "Pigsty Consolidated Homepage", + "description": "Platform engineering entry dashboard", "editable": true, "graphTooltip": 0, "id": null, @@ -89,7 +89,7 @@ { "id": 1, "type": "text", - "title": "\u6a21\u5757\u5bfc\u822a", + "title": "\u603b\u89c8\u5bfc\u822a", "gridPos": { "h": 3, "w": 24, @@ -98,14 +98,14 @@ }, "transparent": true, "options": { - "content": "\n
\n
\n \u57fa\u7840\u8bbe\u65bd\n \u4e3b\u673a\n \u6570\u636e\u5e93\n \u66f4\u591a\u6a21\u5757\n
\n
\u5148\u9009\u6a21\u5757\uff0c\u518d\u7528\u9876\u90e8\u7b5b\u9009\u5668\u7f29\u5c0f\u8303\u56f4\u3002
\n
\n", + "content": "\n
\n
\n
Platform Engineering Home
\n
\u5e73\u53f0\u5de5\u7a0b\u603b\u89c8\u5165\u53e3
\n
\u9996\u9875\u53ea\u4fdd\u7559\u5168\u5c40\u8109\u640f\u3001\u8d44\u6e90\u57df\u6458\u8981\u4e0e\u8df3\u8f6c\uff0c\u8be6\u7ec6\u660e\u7ec6\u7edf\u4e00\u4e0b\u6c89\u5230\u4e8c\u7ea7 dashboard\u3002
\n
\n
\n IAAS\u8d44\u6e90\n PaaS\u670d\u52a1\n \u4e1a\u52a1\u5355\u5143\n
\n
\n", "mode": "html" } }, { "id": 2, "type": "text", - "title": "\u7b5b\u9009\u8bf4\u660e", + "title": "\u7ed3\u6784\u8bf4\u660e", "gridPos": { "h": 5, "w": 24, @@ -114,22 +114,22 @@ }, "transparent": true, "options": { - "content": "\n
\n
\n
\u8303\u56f4\u7b5b\u9009
\n
\u6570\u636e\u6e90 \u2192 \u547d\u540d\u7a7a\u95f4 \u2192 \u670d\u52a1 \u2192 Pod
\n
\u7528\u4e8e\u7f29\u5c0f K8S \u8d44\u6e90\u8303\u56f4
\n
\n
\n
\u5f53\u524d\u5bf9\u8c61
\n
\u4e3b\u673a\u540d \u2192 \u5b9e\u4f8b IP \u2192 \u7f51\u5361
\n
\u7528\u4e8e\u5b9a\u4f4d\u5f53\u524d\u5206\u6790\u5bf9\u8c61
\n
\n
\n
\u89c6\u56fe\u53c2\u6570
\n
\u91c7\u6837\u95f4\u9694 + \u9ad8\u7ea7\u7b5b\u9009
\n
JOB \u4e0e\u8282\u70b9\u6c60\u5df2\u6298\u53e0\u4e3a\u9ad8\u7ea7\u9879
\n
\n
\n", + "content": "\n
\n
\n
IAAS\u8d44\u6e90
\n
\u8ba1\u7b97 / \u5b58\u50a8 / \u7f51\u7edc
\n
\u5148\u770b\u5bbf\u4e3b\u3001\u78c1\u76d8\u3001VIP \u4e0e\u5e95\u5c42\u8d44\u6e90\u662f\u5426\u5065\u5eb7\u3002
\n
\n
\n
PaaS\u670d\u52a1
\n
\u63a7\u5236\u9762 / \u96c6\u7fa4 / DB / \u7f13\u5b58
\n
\u5e73\u53f0\u81ea\u8eab\u4e0e\u5171\u4eab\u670d\u52a1\u6309\u8d44\u6e90\u57df\u7a33\u5b9a\u5206\u5c42\u3002
\n
\n
\n
\u4e1a\u52a1\u5355\u5143
\n
\u4ee3\u7406 / \u8bf7\u6c42
\n
\u4e1a\u52a1\u63a5\u5165\u9762\u4e0e\u8bf7\u6c42\u89c2\u6d4b\u5355\u72ec\u6536\u53e3\uff0c\u4e0d\u518d\u6df7\u5728\u5e95\u5c42\u8d44\u6e90\u91cc\u3002
\n
\n
\n", "mode": "html" } }, { + "id": 3, + "type": "row", + "title": "\u5e73\u53f0\u8109\u640f", "collapsed": false, + "panels": [], "gridPos": { "h": 1, "w": 24, "x": 0, "y": 8 - }, - "title": "\u57fa\u7840\u8bbe\u65bd\u603b\u89c8", - "type": "row", - "panels": [], - "id": 3 + } }, { "datasource": { @@ -331,10 +331,10 @@ ] }, "gridPos": { - "h": 7, - "w": 4, "x": 0, - "y": 9 + "y": 4, + "w": 4, + "h": 7 }, "id": 4, "links": [ @@ -749,10 +749,10 @@ ] }, "gridPos": { - "h": 7, - "w": 4, "x": 4, - "y": 9 + "y": 4, + "w": 4, + "h": 7 }, "id": 5, "links": [ @@ -1524,10 +1524,10 @@ ] }, "gridPos": { - "h": 20, - "w": 12, "x": 8, - "y": 9 + "y": 4, + "w": 8, + "h": 7 }, "id": 6, "options": { @@ -1798,698 +1798,6 @@ "title": "Instances", "type": "stat" }, - { - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 9 - }, - "id": 7, - "options": { - "content": "
insight Overview
", - "mode": "html" - }, - "pluginVersion": "12.3.0", - "title": "insight Overview", - "type": "text" - }, - { - "gridPos": { - "h": 16, - "w": 4, - "x": 20, - "y": 13 - }, - "id": 8, - "options": { - "includeVars": false, - "keepTime": false, - "maxItems": 50, - "query": "", - "showFolderNames": true, - "showHeadings": false, - "showRecentlyViewed": false, - "showSearch": true, - "showStarred": false, - "tags": [ - "Pigsty" - ] - }, - "pluginVersion": "12.3.0", - "title": "Dashboards", - "type": "dashlist" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "links": [ - { - "title": "PGSQL Cluster ${__field.labels.cls}", - "url": "/d/pgsql-cluster?var-cls=${__field.labels.cls}&${__url_time_range}" - } - ], - "mappings": [ - { - "options": { - "-1": { - "color": "gray", - "index": 1, - "text": "N/A" - } - }, - "type": "value" - }, - { - "options": { - "match": "null+nan", - "result": { - "color": "#3e668f", - "index": 0, - "text": "No Clusters" - } - }, - "type": "special" - } - ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#3e668f", - "value": 0 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "PGSQL Cluster ${__field.labels.cls}", - "url": "/d/pgsql-cluster?var-cls=${__field.labels.cls}&${__url_time_range}" - } - ] - }, - { - "id": "color", - "value": { - "fixedColor": "#3e668f", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Redis Cluster ${__field.labels.cls}", - "url": "/d/redis-cluster?var-cls=${__field.labels.cls}&${__url_time_range}" - } - ] - }, - { - "id": "color", - "value": { - "fixedColor": "#cc4637d9", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "C" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Node Cluster : ${__field.labels.cls}", - "url": "/d/node-cluster?var-cls=${__field.labels.cls}&${__url_time_range}" - } - ] - }, - { - "id": "color", - "value": { - "fixedColor": "#e6b03ee6", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "D" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5b9cd5", - "mode": "thresholds" - } - }, - { - "id": "links", - "value": [ - { - "title": "ETCD Overview", - "url": "/d/etcd-overview?${__url_time_range}" - } - ] - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": 0 - }, - { - "color": "#b783af", - "value": 0.5 - }, - { - "color": "red", - "value": 0.66666 - }, - { - "color": "#5b9cd5", - "value": 1 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "text", - "index": 1, - "text": "Dead" - }, - "1": { - "color": "#5b9cd5", - "index": 0, - "text": "Healthy" - } - }, - "type": "value" - } - ] - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "E" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#d0475799", - "mode": "fixed" - } - }, - { - "id": "links", - "value": [ - { - "title": "Minio Overview", - "url": "/d/minio-overview?${__url_time_range}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "R" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6986a3", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "tps" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "links", - "value": [ - { - "title": "PGRDS Cluster : ${__field.labels.cls}", - "url": "/d/pgrds-cluster?var-cls=${__field.labels.cls}&${__url_time_range}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "K" - }, - "properties": [ - { - "id": "color" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "#193e36e0", - "index": 0, - "text": "Down" - }, - "1": { - "color": "#4bb39ce0", - "index": 1, - "text": "Alive" - } - }, - "type": "value" - } - ] - }, - { - "id": "links", - "value": [ - { - "title": "Kafka Cluster : ${__field.labels.cls}", - "url": "/d/kafka-overview?var-cls=${__field.labels.cls}&${__url_time_range}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 8, - "x": 0, - "y": 16 - }, - "id": 9, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": {}, - "textMode": "value_and_name", - "wideLayout": true - }, - "pluginVersion": "12.3.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "cls:pressure5{job=\"pgsql\"}", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "pg:cls:xact_commit_rate5m{job=\"pgrds\"}", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "R" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "redis:cls:cpu_usage{job=\"redis\"}", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node:cls:cpu_usage{job=\"node\"}", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "avg by (cls) (rate(minio_node_process_cpu_total_seconds{job=\"minio\"}[1m]))", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "min by (cls) (up{job=\"kafka\"})", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(etcd_up{job=\"etcd\"}) by (cls) / count(etcd_up{job=\"etcd\"}) by (cls)", - "hide": false, - "interval": "", - "legendFormat": "{{ cls }}", - "range": true, - "refId": "D" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "links": [], - "mappings": [], - "max": 1, - "min": 0, - "noValue": "OK", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#3e668f", - "value": 0 - }, - { - "color": "#fcdb72", - "value": 1 - }, - { - "color": "#f79f64", - "value": 4 - }, - { - "color": "#b783af", - "value": 8 - }, - { - "color": "text", - "value": 16 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Pigsty Alertmanager", - "url": "/alertmgr/" - } - ] - } - ] - }, - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "PGSQL Alert", - "url": "/d/pgsql-alert?${__url_time_range}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 0, - "y": 29 - }, - "id": 10, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.3.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "count(ALERTS{alertstate=\"firing\"}) or on() vector(0)", - "interval": "", - "legendFormat": "Firing Alert", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "count(ALERTS{alertstate=\"pending\"})", - "hide": true, - "interval": "", - "legendFormat": "Pending Alert", - "refId": "B" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "links": [ - { - "targetBlank": true, - "title": "AlertInfo ${__field.labels.alertname}", - "url": "/alertmgr/#/alerts?filter=%7Balertname%3D%22${__field.labels.alertname}%22%7D" - } - ], - "mappings": [], - "max": 1, - "min": 0, - "noValue": "OK", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#3e668f", - "value": 0 - }, - { - "color": "#fcdb72", - "value": 1 - }, - { - "color": "#f79f64", - "value": 2 - }, - { - "color": "#b783af", - "value": 4 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 3, - "y": 29 - }, - "id": 11, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "titleSize": 12 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.3.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "count(ALERTS{alertstate=\"firing\"}) by (alertname, severity)", - "interval": "", - "legendFormat": "{{ alertname }}", - "refId": "A" - } - ], - "type": "stat" - }, { "datasource": { "type": "prometheus", @@ -2595,12 +1903,12 @@ ] }, "gridPos": { - "h": 8, - "w": 16, - "x": 8, - "y": 29 + "x": 16, + "y": 4, + "w": 8, + "h": 7 }, - "id": 12, + "id": 7, "options": { "legend": { "calcs": [ @@ -2648,12064 +1956,427 @@ "type": "timeseries" }, { + "id": 8, + "type": "row", + "title": "IAAS\u8d44\u6e90", + "collapsed": false, + "panels": [], "gridPos": { "h": 1, "w": 24, "x": 0, + "y": 16 + } + }, + { + "id": 9, + "type": "text", + "title": "\u8ba1\u7b97\u6458\u8981", + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 17 + }, + "transparent": true, + "options": { + "content": "\n
\n
IAAS / \u8ba1\u7b97
\n
\u8ba1\u7b97
\n
\u4e3b\u673a\u5bb9\u91cf\u3001\u8282\u70b9\u5065\u5eb7\u3001\u5b9e\u4f8b\u544a\u8b66
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 10, + "type": "text", + "title": "\u5b58\u50a8\u6458\u8981", + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 17 + }, + "transparent": true, + "options": { + "content": "\n
\n
IAAS / \u5b58\u50a8
\n
\u5b58\u50a8
\n
\u78c1\u76d8\u3001\u5377\u3001\u5bf9\u8c61\u5b58\u50a8\u3001JuiceFS
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 11, + "type": "text", + "title": "\u7f51\u7edc\u6458\u8981", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 17 + }, + "transparent": true, + "options": { + "content": "\n
\n
IAAS / \u7f51\u7edc
\n
\u7f51\u7edc
\n
VIP\u3001\u8282\u70b9\u7f51\u7edc\u3001\u5e95\u5c42\u8fde\u901a\u6027
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 12, + "type": "dashlist", + "title": "\u8ba1\u7b97\u76ee\u5f55", + "pluginVersion": "12.3.0", + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 22 + }, + "options": { + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "IAAS-COMPUTE" + ] + } + }, + { + "id": 13, + "type": "dashlist", + "title": "\u5b58\u50a8\u76ee\u5f55", + "pluginVersion": "12.3.0", + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 22 + }, + "options": { + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "IAAS-STORAGE" + ] + } + }, + { + "id": 14, + "type": "dashlist", + "title": "\u7f51\u7edc\u76ee\u5f55", + "pluginVersion": "12.3.0", + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 22 + }, + "options": { + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "IAAS-NETWORK" + ] + } + }, + { + "id": 15, + "type": "row", + "title": "PaaS\u670d\u52a1", + "collapsed": false, + "panels": [], + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + } + }, + { + "id": 16, + "type": "text", + "title": "\u5e73\u53f0\u63a7\u5236\u9762\u6458\u8981", + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 32 + }, + "transparent": true, + "options": { + "content": "\n
\n
PaaS / \u5e73\u53f0\u63a7\u5236\u9762
\n
\u5e73\u53f0\u63a7\u5236\u9762
\n
Grafana\u3001Victoria\u3001Alertmanager\u3001Etcd\u3001CMDB
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 17, + "type": "text", + "title": "\u96c6\u7fa4\u6458\u8981", + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 32 + }, + "transparent": true, + "options": { + "content": "\n
\n
PaaS / \u96c6\u7fa4
\n
\u96c6\u7fa4
\n
K8S \u96c6\u7fa4\u8d44\u6e90\u3001\u547d\u540d\u7a7a\u95f4\u4e0e\u5de5\u4f5c\u8d1f\u8f7d\u5165\u53e3
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 18, + "type": "text", + "title": "DB\u6458\u8981", + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 32 + }, + "transparent": true, + "options": { + "content": "\n
\n
PaaS / DB
\n
DB
\n
PGSQL\u3001PGRDS\u3001PGCAT\u3001Ferret
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 19, + "type": "text", + "title": "\u7f13\u5b58\u6458\u8981", + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 32 + }, + "transparent": true, + "options": { + "content": "\n
\n
PaaS / \u7f13\u5b58
\n
\u7f13\u5b58
\n
Redis \u96c6\u7fa4\u3001\u5b9e\u4f8b\u4e0e\u7f13\u5b58\u670d\u52a1\u8fd0\u884c\u9762
\n \n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 20, + "type": "dashlist", + "title": "\u5e73\u53f0\u63a7\u5236\u9762\u76ee\u5f55", + "pluginVersion": "12.3.0", + "gridPos": { + "h": 10, + "w": 6, + "x": 0, "y": 37 }, - "id": 13, "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
\n\"\"", - "mode": "html" - }, + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "PAAS-CONTROL-PLANE" + ] + } + }, + { + "id": 21, + "type": "dashlist", + "title": "\u96c6\u7fa4\u76ee\u5f55", "pluginVersion": "12.3.0", - "transparent": true, - "type": "text" - }, - { - "collapsed": false, "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "title": "\u4e3b\u673a\u89c2\u6d4b", - "type": "row", - "panels": [], - "id": 14 - }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "WAYOn0FGz" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 15, - "panels": [], - "title": "\ud83c\udfe1\u8d44\u6e90\u603b\u89c8\uff1a\u5f53\u524dJOB\u3010$origin_prometheus\uff1a$job\u3011\u5f53\u524d\u9009\u4e2d\u4e3b\u673a\u3010$show_hostname\u3011\u5b9e\u4f8b\uff1a$node", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "\u5206\u533a\u4f7f\u7528\u7387\u3001\u78c1\u76d8\u8bfb\u53d6\u3001\u78c1\u76d8\u5199\u5165\u3001\u4e0b\u8f7d\u5e26\u5bbd\u3001\u4e0a\u4f20\u5e26\u5bbd\uff0c\u5982\u679c\u6709\u591a\u4e2a\u7f51\u5361\u6216\u8005\u591a\u4e2a\u5206\u533a\uff0c\u662f\u91c7\u96c6\u7684\u4f7f\u7528\u7387\u6700\u9ad8\u7684\u7f51\u5361\u6216\u8005\u5206\u533a\u7684\u6570\u503c\u3002\n\n\u8fde\u63a5\u6570\uff1aCurrEstab - \u5f53\u524d\u72b6\u6001\u4e3a ESTABLISHED \u6216 CLOSE-WAIT \u7684 TCP \u8fde\u63a5\u6570\u3002\n\n\u5065\u5eb7\u503c\u662f\u4e00\u4e2a\u65b0\u589e\u7684\u6307\u6807\uff0c\u6839\u636eCPU\uff0c\u5185\u5b58\uff0cIO\u8ba1\u7b97\u51fa\u6765\u7684\u4e00\u4e2a\u503c\uff0c\u4f4e\u4e8e90\u5206\u8bf4\u660e\u7cfb\u7edf\u7684\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\u9700\u8981\u6ce8\u610f\u4e86\uff0c\u8fd9\u662f\u4e00\u4e2a\u6b63\u5728\u6d4b\u8bd5\u7684\u6307\u6807\uff0c\u53c2\u6570\u53ef\u80fd\u9700\u8981\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u518d\u4f18\u5316\u3002", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "decimals": 1, - "mappings": [], - "max": 100, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - }, - { - "id": "decimals" - }, - { - "id": "custom.width", - "value": 66 - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u542f\u52a8(\u5929)" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.width", - "value": 69 - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u8bfb\u53d6*" - }, - "properties": [ - { - "id": "unit", - "value": "binBps" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 10485760 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 20485760 - } - ] - } - }, - { - "id": "custom.width", - "value": 93 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u5199\u5165*" - }, - "properties": [ - { - "id": "unit", - "value": "binBps" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 10485760 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 20485760 - } - ] - } - }, - { - "id": "custom.width", - "value": 95 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4e0b\u8f7d\u5e26\u5bbd*" - }, - "properties": [ - { - "id": "unit", - "value": "binbps" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 30485760 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 104857600 - } - ] - } - }, - { - "id": "custom.width", - "value": 91 - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4e0a\u4f20\u5e26\u5bbd*" - }, - "properties": [ - { - "id": "unit", - "value": "binbps" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 30485760 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 104857600 - } - ] - } - }, - { - "id": "custom.width", - "value": 85 - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8d1f\u8f7d" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.width", - "value": 63 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8fde\u63a5\u6570" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1000 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 1500 - } - ] - } - }, - { - "id": "custom.width", - "value": 59 - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "TCP_tw" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 5000 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 20000 - } - ] - } - }, - { - "id": "custom.width", - "value": 69 - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU" - }, - "properties": [ - { - "id": "custom.width", - "value": 63 - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "IP" - }, - "properties": [ - { - "id": "custom.width", - "value": 111 - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.align", - "value": "left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4e3b\u673a\u540d" - }, - "properties": [ - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.width" - }, - { - "id": "custom.align", - "value": "left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5065\u5eb7\u503c" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "orange", - "value": 80 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - { - "id": "color", - "value": { - "mode": "thresholds" - } - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u4f7f\u7528\u7387.*/" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "custom.width", - "value": 110 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 40 - }, - "id": 16, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": [ - "Value #B", - "Value #C", - "Value #L", - "Value #H", - "Value #I", - "Value #M", - "Value #N", - "Value #J", - "Value #K" - ], - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "\u5065\u5eb7\u503c" - } - ] - }, - "pluginVersion": "11.0.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u4e3b\u673a\u540d", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(time() - node_boot_time_seconds{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})by(instance)/86400", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u8fd0\u884c\u65f6\u95f4", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u603b\u5185\u5b58", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode='system'}) by (instance)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u603b\u6838\u6570", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_load5{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "5\u5206\u949f\u8d1f\u8f7d", - "refId": "L" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(1 - avg(irate(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode=\"idle\"}[$interval])) by (instance)) * 100", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU\u4f7f\u7528\u7387", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(1 - (node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} / (node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})))* 100", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u4f7f\u7528\u7387", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max((node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}) *100/(node_filesystem_avail_bytes {origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}+(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"ext.?|xfs\"})))by(instance)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "__auto", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(irate(node_disk_read_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])) by (instance)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u6700\u5927\u8bfb\u53d6", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(irate(node_disk_written_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])) by (instance)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u6700\u5927\u5199\u5165", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_netstat_Tcp_CurrEstab{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u8fde\u63a5\u6570", - "refId": "M" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_sockstat_TCP_tw{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "TIME_WAIT", - "refId": "N" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(irate(node_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])*8) by (instance)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u4e0b\u8f7d\u5e26\u5bbd", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(irate(node_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])*8) by (instance)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u4e0a\u4f20\u5e26\u5bbd", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "((1-(1 - avg(irate(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode=\"idle\"}[$interval])) by (instance))^1.3)^(1/3)*0.5 + \r\n(1-(1 - avg(node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} / node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})by (instance))^6)^(1/3)*0.3 + \r\n(1 - max(irate(node_disk_io_time_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval]))by (instance)^1.1)^(1/2)*0.2)*100", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "__auto", - "refId": "O" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(irate(node_disk_io_time_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[$interval])) by (instance) *100", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "IOutil\u4f7f\u7528\u7387", - "refId": "P" - } - ], - "title": "\u670d\u52a1\u5668\u8d44\u6e90\u603b\u89c8\u8868\u3010\u4e3b\u673a\u603b\u6570\uff1a$total\u3011", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "exp": false, - "iid": false - }, - "includeByName": {}, - "indexByName": { - "Time": 20, - "Value #A": 36, - "Value #B": 7, - "Value #C": 8, - "Value #D": 4, - "Value #E": 13, - "Value #F": 10, - "Value #G": 11, - "Value #H": 14, - "Value #I": 15, - "Value #J": 18, - "Value #K": 19, - "Value #L": 9, - "Value #M": 16, - "Value #N": 17, - "Value #O": 6, - "Value #P": 12, - "__name__": 37, - "account": 21, - "cservice": 22, - "domainname": 23, - "exp": 5, - "group": 24, - "iaccount": 25, - "igroup": 26, - "iid": 3, - "iname": 27, - "instance": 2, - "job": 28, - "machine": 29, - "name": 1, - "nodename": 0, - "origin_prometheus": 30, - "region": 31, - "release": 32, - "sysname": 33, - "vendor": 34, - "version": 35 - }, - "renameByName": { - "Value #B": "\u5185\u5b58", - "Value #C": "CPU", - "Value #D": "\u542f\u52a8(\u5929)", - "Value #E": "\u5206\u533a\u4f7f\u7528\u7387*", - "Value #F": "CPU\u4f7f\u7528\u7387", - "Value #G": "\u5185\u5b58\u4f7f\u7528\u7387", - "Value #H": "\u78c1\u76d8\u8bfb\u53d6*", - "Value #I": "\u78c1\u76d8\u5199\u5165*", - "Value #J": "\u4e0b\u8f7d\u5e26\u5bbd*", - "Value #K": "\u4e0a\u4f20\u5e26\u5bbd*", - "Value #L": "\u8d1f\u8f7d", - "Value #M": "\u8fde\u63a5\u6570", - "Value #N": "TCP_tw", - "Value #O": "\u5065\u5eb7\u503c", - "Value #P": "IOutil\u4f7f\u7528\u7387*", - "exp": "\u5230\u671f\u65e5", - "iid": "\u5b9e\u4f8bID", - "instance": "IP", - "name": "", - "nodename": "\u4e3b\u673a\u540d" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "\u4e3b\u673a\u540d", - "IP", - "\u542f\u52a8(\u5929)", - "\u5065\u5eb7\u503c", - "\u5185\u5b58", - "CPU", - "\u8d1f\u8f7d", - "CPU\u4f7f\u7528\u7387", - "\u5185\u5b58\u4f7f\u7528\u7387", - "IOutil\u4f7f\u7528\u7387*", - "\u5206\u533a\u4f7f\u7528\u7387*", - "\u78c1\u76d8\u8bfb\u53d6*", - "\u78c1\u76d8\u5199\u5165*", - "\u8fde\u63a5\u6570", - "TCP_tw", - "\u4e0b\u8f7d\u5e26\u5bbd*", - "\u4e0a\u4f20\u5e26\u5bbd*" - ] - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "- P99\uff1a\u6570\u636e\u96c6\u6309\u5347\u5e8f\u6392\u5217\uff0c\u7b2c99\u5206\u4f4d\u7f6e\u5927\u7684\u6570\u636e\u3002\uff08\u5373\u5347\u5e8f\u6392\u5217\u540e\u6392\u572899%\u4f4d\u7f6e\u7684\u6570\u636e\uff09\n- \u8be5\u8868\u683c\u9700\u8981\u5728Prometheus\u589e\u52a0\u8bb0\u5f55\u89c4\u5219\uff08\u53c2\u8003\u770b\u677f\u4e0b\u8f7d\u9875\uff09\n- \u589e\u52a0\u8bb0\u5f55\u89c4\u52191\u5c0f\u65f6\u540e\u624d\u4f1a\u6709\u5c55\u793a\u7684\u6570\u636e\u3002\n- \u65f6\u95f4\u8303\u56f4[7d:1h]\u8868\u793a\u8981\u67e5\u770b\u8fc7\u53bb 7 \u5929\u5185\u6bcf\u5c0f\u65f6\u7684\u6570\u636e\u70b9\u3002", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" - }, - "inspect": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*%/" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.width", - "value": 72 - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "IP" - }, - "properties": [ - { - "id": "custom.width", - "value": 91 - }, - { - "id": "mappings", - "value": [ - { - "options": { - "pattern": "/(.+):.+/", - "result": { - "index": 0, - "text": "$1" - } - }, - "type": "regex" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "P99\u5185\u5b58\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "custom.width", - "value": 79 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "P99CPU\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "custom.width", - "value": 101 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u540d\u79f0" - }, - "properties": [ - { - "id": "custom.width", - "value": 128 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4e3b\u673a\u540d" - }, - "properties": [ - { - "id": "custom.width", - "value": 138 - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 51 - }, - "id": 17, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "P99\u5185\u5b58%" - } - ] - }, - "pluginVersion": "11.0.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - 0", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "\u4e3b\u673a\u540d", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "quantile_over_time(0.99, cpu:usage:rate1m{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[7d:1h])", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU\u4f7f\u7528\u7387P99", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "quantile_over_time(0.99, mem:usage:rate1m{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}[7d:1h])", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u4f7f\u7528\u7387P99", - "refId": "C" - } - ], - "title": "\u6700\u8fd17\u5929P99\u8d44\u6e90\u4f7f\u7528\u7387", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "instance" - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "pattern": "/^Value #[^A]|^instance$|^nodename$/" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": { - "Value #B": 2, - "Value #C": 3, - "instance": 1, - "nodename": 0 - }, - "renameByName": { - "Value #B": "P99CPU%", - "Value #C": "P99\u5185\u5b58%", - "instance": "IP", - "name": "", - "name 1": "", - "nodename": "\u4e3b\u673a\u540d" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u603b5\u5206\u949f\u8d1f\u8f7d", - "axisPlacement": "auto", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747%" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.axisLabel", - "value": "\u603b\u5e73\u5747\u4f7f\u7528\u7387" - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.axisSoftMin" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u6838\u6570" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C4162A", - "mode": "fixed" - } - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.drawStyle", - "value": "points" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "5m\u8d1f\u8f7d" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 7, + "h": 8, "w": 6, "x": 6, - "y": 51 + "y": 37 }, - "id": 18, - "maxDataPoints": 100, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(node_load5{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "5m\u8d1f\u8f7d", - "range": true, - "refId": "A", - "step": 240 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode='system'})", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6838\u6570", - "refId": "B", - "step": 240 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "avg(1 - avg(irate(node_cpu_seconds_total{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",mode=\"idle\"}[$interval])) by (instance)) * 100", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5e73\u5747%", - "range": true, - "refId": "F", - "step": 240 - } - ], - "title": "\u6574\u4f53\u603b\u8d1f\u8f7d\u4e0e\u6574\u4f53\u5e73\u5747CPU\u4f7f\u7528\u7387", - "type": "timeseries" + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "PAAS-CLUSTER" + ] + } }, { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u603b\u5df2\u7528\u5185\u5b58", - "axisPlacement": "auto", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u603b\u5185\u5b58" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C4162A", - "mode": "fixed" - } - }, - { - "id": "custom.drawStyle", - "value": "points" - }, - { - "id": "custom.pointSize", - "value": 3 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747%" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.axisLabel", - "value": "\u603b\u5e73\u5747\u4f7f\u7528\u7387" - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.axisSoftMin" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u5df2\u7528" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - }, + "id": 22, + "type": "dashlist", + "title": "DB\u76ee\u5f55", + "pluginVersion": "12.3.0", "gridPos": { - "h": 7, + "h": 14, "w": 6, "x": 12, - "y": 51 + "y": 37 }, - "id": 19, - "maxDataPoints": 100, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u5df2\u7528", - "range": true, - "refId": "B", - "step": 4 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"})", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u5185\u5b58", - "refId": "A", - "step": 4 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"} - node_memory_MemAvailable_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}) / sum(node_memory_MemTotal_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}))*100", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5e73\u5747%", - "range": true, - "refId": "H" - } - ], - "title": "\u6574\u4f53\u603b\u5185\u5b58\u4e0e\u6574\u4f53\u5e73\u5747\u5185\u5b58\u4f7f\u7528\u7387", - "type": "timeseries" + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "PAAS-DB" + ] + } }, { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u603b\u78c1\u76d8\u4f7f\u7528\u91cf", - "axisPlacement": "auto", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747%" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.axisLabel", - "value": "\u603b\u5e73\u5747\u4f7f\u7528\u7387" - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.axisSoftMin" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u78c1\u76d8" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C4162A", - "mode": "fixed" - } - }, - { - "id": "custom.drawStyle", - "value": "points" - }, - { - "id": "custom.pointSize", - "value": 3 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u91cf" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - }, + "id": 23, + "type": "dashlist", + "title": "\u7f13\u5b58\u76ee\u5f55", + "pluginVersion": "12.3.0", "gridPos": { - "h": 7, + "h": 9, "w": 6, "x": 18, - "y": 51 + "y": 37 }, - "id": 20, - "maxDataPoints": 100, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance)) - sum(avg(node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u4f7f\u7528\u91cf", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u78c1\u76d8", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance)) - sum(avg(node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))) *100/(sum(avg(node_filesystem_avail_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))+(sum(avg(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance)) - sum(avg(node_filesystem_free_bytes{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\",fstype=~\"xfs|ext.*\"})by(device,instance))))", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5e73\u5747%", - "refId": "A" - } - ], - "title": "\u6574\u4f53\u603b\u78c1\u76d8\u4e0e\u6574\u4f53\u5e73\u5747\u78c1\u76d8\u4f7f\u7528\u7387", - "type": "timeseries" + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "PAAS-CACHE" + ] + } }, { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "WAYOn0FGz" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 58 - }, - "id": 21, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "\u672c\u770b\u677f\u4e2d\u7684\uff1a\u78c1\u76d8\u603b\u91cf\u3001\u4f7f\u7528\u91cf\u3001\u53ef\u7528\u91cf\u3001\u4f7f\u7528\u7387\u4fdd\u6301\u548cdf\u547d\u4ee4\u7684Size\u3001Used\u3001Avail\u3001Use% \u5217\u7684\u503c\u4e00\u81f4\uff0c\u5e76\u4e14Use%\u7684\u503c\u4f1a\u56db\u820d\u4e94\u5165\u4fdd\u7559\u4e00\u4f4d\u5c0f\u6570\uff0c\u4f1a\u66f4\u52a0\u51c6\u786e\u3002\n\n\u6ce8\uff1adf\u4e2dUse%\u7b97\u6cd5\u4e3a\uff1a(size - free) * 100 / (avail + (size - free))\uff0c\u7ed3\u679c\u662f\u6574\u9664\u5219\u4e3a\u8be5\u503c\uff0c\u975e\u6574\u9664\u5219\u4e3a\u8be5\u503c+1\uff0c\u7ed3\u679c\u7684\u5355\u4f4d\u662f%\u3002\n\u53c2\u8003df\u547d\u4ee4\u6e90\u7801\uff1a", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u5206\u533a" - }, - "properties": [ - { - "id": "custom.width", - "value": 81 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5269\u4f59\u7a7a\u95f4" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - }, - { - "id": "decimals" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red" - }, - { - "color": "orange", - "value": 10000000000 - }, - { - "color": "green", - "value": 20000000000 - } - ] - } - }, - { - "id": "custom.width", - "value": 72 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "custom.width", - "value": 115 - }, - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 100 - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u7a7a\u95f4" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - }, - { - "id": "custom.width", - "value": 75 - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u7c7b\u578b" - }, - "properties": [ - { - "id": "custom.width", - "value": 51 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8bbe\u5907\u540d" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 59 - }, - "id": 181, - "links": [ - { - "targetBlank": true, - "title": "https://github.com/coreutils/coreutils/blob/master/src/df.c", - "url": "https://github.com/coreutils/coreutils/blob/master/src/df.c" - } - ], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "\u4f7f\u7528\u7387" - } - ] - }, - "pluginVersion": "11.0.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}-0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u91cf", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "node_filesystem_avail_bytes {instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}-0", - "format": "table", - "hide": false, - "instant": true, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "(node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}) *100/(node_filesystem_avail_bytes {instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}+(node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "B" - } - ], - "title": "\u3010$show_hostname\u3011\uff1a\u5206\u533a\u53ef\u7528\u7a7a\u95f4(EXT.*/XFS/NFS)", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "device", - "fstype", - "mountpoint", - "Value #C", - "Value #A", - "Value #B" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "Value #A": "\u5269\u4f59\u7a7a\u95f4", - "Value #B": "\u4f7f\u7528\u7387", - "Value #C": "\u603b\u7a7a\u95f4", - "device": "\u8bbe\u5907\u540d", - "fstype": "\u7c7b\u578b", - "mountpoint": "\u5206\u533a" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "0": { - "text": "N/A" - } - }, - "type": "value" - } - ], - "max": 100, - "min": 0.1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "#EAB839", - "value": 70 - }, - { - "color": "red", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 8, - "y": 59 - }, - "id": 177, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 45, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "11.0.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "100 - (avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"idle\"}[$interval])) * 100)", - "instant": true, - "interval": "", - "legendFormat": "\u603bCPU\u4f7f\u7528\u7387", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"iowait\"}[$interval])) * 100", - "hide": true, - "instant": true, - "interval": "", - "legendFormat": "IOwait\u4f7f\u7528\u7387", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "(1 - (node_memory_MemAvailable_bytes{instance=~\"$node\"} / (node_memory_MemTotal_bytes{instance=~\"$node\"})))* 100", - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u4f7f\u7528\u7387", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}-node_filesystem_free_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"})*100 /(node_filesystem_avail_bytes {instance=~\"$node\",fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}+(node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}-node_filesystem_free_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs\",mountpoint=\"$maxmount\"}))", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u6700\u5927\u5206\u533a\u4f7f\u7528\u7387({{mountpoint}})", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(1 - ((node_memory_SwapFree_bytes{instance=~\"$node\"} + 1)/ (node_memory_SwapTotal_bytes{instance=~\"$node\"} + 1))) * 100", - "instant": true, - "interval": "", - "legendFormat": "\u4ea4\u6362\u5206\u533a\u4f7f\u7528\u7387", - "refId": "F" - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u8fd0\u884c\u65f6\u95f4" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red" - }, - { - "color": "orange", - "value": 3600 - }, - { - "color": "green", - "value": 7200 - } - ] - } - }, - { - "id": "unit", - "value": "s" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u5185\u5b58" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU iowait" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "green" - }, - { - "color": "orange", - "value": 40 - }, - { - "color": "red", - "value": 60 - } - ] - } - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u6587\u4ef6\u63cf\u8ff0\u7b26" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red" - }, - { - "color": "orange", - "value": 50000 - }, - { - "color": "green", - "value": 200000 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u6700\u5927\u6253\u5f00\u6587\u4ef6" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red" - }, - { - "color": "orange", - "value": 10000 - }, - { - "color": "green", - "value": 50000 - } - ] - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 4, - "x": 12, - "y": 59 - }, - "id": 206, - "interval": "15s", - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 15 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.0.0", - "targets": [ - { - "alias": "", - "bucketAggs": [ - { - "id": "2", - "settings": { - "interval": "auto" - }, - "type": "date_histogram" - } - ], - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "avg(time() - node_boot_time_seconds{instance=~\"$node\"})", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u8fd0\u884c\u65f6\u95f4", - "metrics": [ - { - "id": "1", - "type": "count" - } - ], - "query": "", - "refId": "C", - "timeField": "@timestamp" - }, - { - "alias": "", - "bucketAggs": [ - { - "id": "2", - "settings": { - "interval": "auto" - }, - "type": "date_histogram" - } - ], - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "count(node_cpu_seconds_total{instance=~\"$node\", mode='system'})", - "instant": true, - "interval": "", - "legendFormat": "CPU \u6838\u6570", - "metrics": [ - { - "id": "1", - "type": "count" - } - ], - "query": "", - "refId": "A", - "timeField": "@timestamp" - }, - { - "alias": "", - "bucketAggs": [ - { - "id": "2", - "settings": { - "interval": "auto" - }, - "type": "date_histogram" - } - ], - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(node_memory_MemTotal_bytes{instance=~\"$node\"})", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u603b\u5185\u5b58", - "metrics": [ - { - "id": "1", - "type": "count" - } - ], - "query": "", - "refId": "B", - "timeField": "@timestamp" - }, - { - "alias": "", - "bucketAggs": [ - { - "id": "2", - "settings": { - "interval": "auto" - }, - "type": "date_histogram" - } - ], - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"iowait\"}[$interval])) * 100", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU iowait", - "metrics": [ - { - "id": "1", - "type": "count" - } - ], - "query": "", - "refId": "D", - "timeField": "@timestamp" - }, - { - "alias": "", - "bucketAggs": [ - { - "id": "2", - "settings": { - "interval": "auto" - }, - "type": "date_histogram" - } - ], - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "node_filefd_maximum{instance=~\"$node\"}", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u603b\u6587\u4ef6\u63cf\u8ff0\u7b26", - "metrics": [ - { - "id": "1", - "type": "count" - } - ], - "query": "", - "refId": "E", - "timeField": "@timestamp" - }, - { - "alias": "", - "bucketAggs": [ - { - "id": "2", - "settings": { - "interval": "auto" - }, - "type": "date_histogram" - } - ], - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "process_max_fds{job=\"node_exporter\",instance=~\"$node\"}", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u6700\u5927\u6253\u5f00\u6587\u4ef6", - "metrics": [ - { - "id": "1", - "type": "count" - } - ], - "query": "", - "refId": "F", - "timeField": "@timestamp" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "bars", - "fillOpacity": 60, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "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": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in\u4e0b\u8f7d" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_out\u4e0a\u4f20" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_in\u4e0b\u8f7d" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out\u4e0a\u4f20" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 59 - }, - "id": 183, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "increase(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[1m])", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{device}}_in\u4e0b\u8f7d", - "metric": "", - "refId": "A", - "step": 600, - "target": "" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "increase(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[1m])", - "hide": false, - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{device}}_out\u4e0a\u4f20", - "refId": "B", - "step": 600 - } - ], - "title": "\u6bcf\u5206\u949f\u6d41\u91cf$device", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u603b\u4f7f\u7528\u7387", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u603b\u4f7f\u7528\u7387/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8IO\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "custom.axisLabel", - "value": "\u78c1\u76d8IO\u4f7f\u7528\u7387" - }, - { - "id": "color", - "value": { - "fixedColor": "#0ad4ff", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u7528\u6237\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u7cfb\u7edf\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 65 - }, - "id": 207, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "(1 - avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"idle\"}[$interval])) by (instance))*100", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u4f7f\u7528\u7387", - "refId": "F", - "step": 240 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"system\"}[$interval])) by (instance) *100", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u7cfb\u7edf\u4f7f\u7528\u7387", - "refId": "A", - "step": 20 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"user\"}[$interval])) by (instance) *100", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u7528\u6237\u4f7f\u7528\u7387", - "refId": "B", - "step": 240 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "avg(irate(node_cpu_seconds_total{instance=~\"$node\",mode=\"iowait\"}[$interval])) by (instance) *100", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u78c1\u76d8IO\u4f7f\u7528\u7387", - "refId": "D", - "step": 240 - } - ], - "title": "CPU\u4f7f\u7528\u7387", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u5269\u4f59\u5185\u5b58", - "axisPlacement": "left", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u53ef\u7528" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#9ac48a", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u5185\u5b58" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C4162A", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.showPoints", - "value": "always" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#00d1ff", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.axisLabel", - "value": "\u5185\u5b58\u4f7f\u7528\u7387" - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "custom.axisSoftMin" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5df2\u7528" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 65 - }, - "id": 156, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_memory_MemAvailable_bytes{instance=~\"$node\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u53ef\u7528", - "refId": "F", - "step": 4 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "node_memory_MemTotal_bytes{instance=~\"$node\"}", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "2m", - "intervalFactor": 1, - "legendFormat": "\u603b\u5185\u5b58", - "refId": "A", - "step": 4 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_memory_MemTotal_bytes{instance=~\"$node\"} - node_memory_MemAvailable_bytes{instance=~\"$node\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5df2\u7528", - "refId": "B", - "step": 4 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "(1 - (node_memory_MemAvailable_bytes{instance=~\"$node\"} / (node_memory_MemTotal_bytes{instance=~\"$node\"})))* 100", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u4f7f\u7528\u7387", - "refId": "H" - } - ], - "title": "\u5185\u5b58\u4fe1\u606f", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u5bb9\u91cf\u4f7f\u7528\u7387", - "axisPlacement": "auto", - "axisSoftMax": 100, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "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": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Inodes.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#00d1ff", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.axisLabel", - "value": "Inodes\u4f7f\u7528\u7387" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 65 - }, - "id": 174, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}) *100/(node_filesystem_avail_bytes {instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}+(node_filesystem_size_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}-node_filesystem_free_bytes{instance=~\"$node\",fstype=~\"ext.*|xfs|nfs\",mountpoint !~\".*pod.*\"}))", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5bb9\u91cf%\uff1a{{mountpoint}}", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(1 - node_filesystem_files_free{instance=~\"$node\",fstype=~\"ext.?|xfs|nfs\",mountpoint !~\".*pod.*\"} / node_filesystem_files{instance=~\"$node\",fstype=~\"ext.?|xfs|nfs\",mountpoint !~\".*pod.*\"}) * 100", - "hide": false, - "interval": "", - "legendFormat": "Inodes%\uff1a{{mountpoint}}", - "range": true, - "refId": "B" - } - ], - "title": "\u78c1\u76d8\u4f7f\u7528\u7387", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "1\u5206\u949f\u8d1f\u8f7d", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "15\u5206\u949f\u8d1f\u8f7d" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "1\u5206\u949f\u8d1f\u8f7d" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "5\u5206\u949f\u8d1f\u8f7d" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u603b\u6838\u6570/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C4162A", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "custom.pointSize", - "value": 4 - }, - { - "id": "custom.showPoints", - "value": "always" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 73 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "node_load1{instance=~\"$node\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "1\u5206\u949f\u8d1f\u8f7d", - "metric": "", - "refId": "A", - "step": 20, - "target": "" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": " sum(count(node_cpu_seconds_total{instance=~\"$node\", mode='system'}) by (cpu,instance)) by(instance)", - "format": "time_series", - "instant": false, - "interval": "2m", - "intervalFactor": 1, - "legendFormat": "CPU\u603b\u6838\u6570", - "refId": "D", - "step": 20 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_load5{instance=~\"$node\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "5\u5206\u949f\u8d1f\u8f7d", - "refId": "B", - "step": 20 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_load15{instance=~\"$node\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "15\u5206\u949f\u8d1f\u8f7d", - "refId": "C", - "step": 20 - } - ], - "title": "\u7cfb\u7edf\u5e73\u5747\u8d1f\u8f7d", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "bars", - "fillOpacity": 100, - "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": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u7b49\u5f85IO\u5b8c\u6210\u963b\u585e\u7684\u8fdb\u7a0b" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8fd0\u884c\u6001\u7684\u8fdb\u7a0b" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsZero", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsNull", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 73 - }, - "id": 202, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "calculatedInterval": "2m", - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "datasourceErrors": {}, - "errors": {}, - "exemplar": true, - "expr": "node_procs_running{instance=~\"$node\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "\u8fd0\u884c\u6001\u7684\u8fdb\u7a0b", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_running%7Binstance%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "A", - "step": 5, - "target": "" - }, - { - "calculatedInterval": "2m", - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "datasourceErrors": {}, - "errors": {}, - "exemplar": true, - "expr": "node_procs_blocked{instance=~\"$node\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "\u7b49\u5f85IO\u5b8c\u6210\u963b\u585e\u7684\u8fdb\u7a0b", - "metric": "", - "prometheusLink": "/api/datasources/proxy/1/graph#%5B%7B%22expr%22%3A%22node_procs_blocked%7Binstance%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A46%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D", - "refId": "B", - "step": 5, - "target": "" - } - ], - "title": "\u8fdb\u7a0b\u8fd0\u884c\u72b6\u6001", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u603b\u4f7f\u7528FD" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u4f7f\u7528FD\u5360\u6bd4" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u6bcf\u79d2\u4e0a\u4e0b\u6587\u5207\u6362" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u5360\u6bd4/" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.pointSize", - "value": 3 - }, - { - "id": "custom.axisSoftMax", - "value": 100 - }, - { - "id": "custom.axisSoftMin", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8fdb\u7a0b\u4f7f\u7528FD\u5360\u6bd4" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 73 - }, - "hideTimeOverride": false, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "irate(node_context_switches_total{instance=~\"$node\"}[$interval])", - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6bcf\u79d2\u4e0a\u4e0b\u6587\u5207\u6362", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "node_filefd_allocated{instance=~\"$node\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u4f7f\u7528FD", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(node_filefd_allocated{instance=~\"$node\"}/node_filefd_maximum{instance=~\"$node\"}) *100", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u603b\u4f7f\u7528FD\u5360\u6bd4", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(process_open_fds{instance=~\"$node\"}/process_max_fds{instance=~\"$node\"}) *100", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u8fdb\u7a0b\u4f7f\u7528FD\u5360\u6bd4", - "refId": "D" - } - ], - "title": "\u6587\u4ef6\u63cf\u8ff0\u7b26(FD)/\u6bcf\u79d2\u4e0a\u4e0b\u6587\u5207\u6362", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "Read time seconds \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u8bfb\u64cd\u4f5c\u82b1\u8d39\u7684\u79d2\u6570\n\nWrite time seconds \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u5199\u64cd\u4f5c\u82b1\u8d39\u7684\u79d2\u6570\n\nIO time seconds \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u8f93\u5165/\u8f93\u51fa\u64cd\u4f5c\u82b1\u8d39\u7684\u79d2\u6570\n\nIO time weighted seconds\u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u8f93\u5165/\u8f93\u51fa\u64cd\u4f5c\u82b1\u8d39\u7684\u52a0\u6743\u79d2\u6570", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "\u8bfb\u53d6\uff08-\uff09/\u5199\u5165\uff08+\uff09", - "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": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "vda" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/,*_\u8bfb\u53d6$/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsZero", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsNull", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 81 - }, - "id": 160, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_read_time_seconds_total{instance=~\"$node\"}[$interval]) / irate(node_disk_reads_completed_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u8bfb\u53d6", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_write_time_seconds_total{instance=~\"$node\"}[$interval]) / irate(node_disk_writes_completed_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u5199\u5165", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_io_time_seconds_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_io_time_weighted_seconds_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u52a0\u6743", - "refId": "D" - } - ], - "title": "\u6bcf\u6b21IO\u8bfb\u5199\u7684\u8017\u65f6\uff08\u53c2\u8003\uff1a\u5c0f\u4e8e100ms\uff09", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "Reads completed: \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u6bcf\u79d2\u8bfb\u5b8c\u6210\u6b21\u6570\n\nWrites completed: \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u6bcf\u79d2\u5199\u5b8c\u6210\u6b21\u6570\n\nIO now \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u6bcf\u79d2\u6b63\u5728\u5904\u7406\u7684\u8f93\u5165/\u8f93\u51fa\u8bf7\u6c42\u6570", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "\u8bfb\u53d6\uff08-\uff09/\u5199\u5165\uff08+\uff09I/O ops/sec", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "vda_write" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_\u8bfb\u53d6$/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsZero", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsNull", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 81 - }, - "id": 161, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_reads_completed_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u8bfb\u53d6", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_writes_completed_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u5199\u5165", - "refId": "B", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_disk_io_now{instance=~\"$node\"}", - "format": "time_series", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}", - "refId": "C" - } - ], - "title": "\u78c1\u76d8\u8bfb\u5199\u901f\u7387\uff08IOPS\uff09", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "Read bytes \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u6bcf\u79d2\u8bfb\u53d6\u7684\u6bd4\u7279\u6570\nWritten bytes \u6bcf\u4e2a\u78c1\u76d8\u5206\u533a\u6bcf\u79d2\u5199\u5165\u7684\u6bd4\u7279\u6570", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "\u8bfb\u53d6\uff08-\uff09/\u5199\u5165\uff08+\uff09", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "Bps" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "vda_write" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_\u8bfb\u53d6$/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsZero", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsNull", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 81 - }, - "id": 168, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_read_bytes_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u8bfb\u53d6", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_disk_written_bytes_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u5199\u5165", - "refId": "B", - "step": 10 - } - ], - "title": "\u6bcf\u79d2\u78c1\u76d8\u8bfb\u5199\u5bb9\u91cf", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "\u6bcf\u4e00\u79d2\u949f\u7684\u81ea\u7136\u65f6\u95f4\u5185\uff0c\u82b1\u8d39\u5728I/O\u4e0a\u7684\u8017\u65f6\u3002\uff08wall-clock time\uff09\n\nnode_disk_io_time_seconds_total\uff1a\n\u78c1\u76d8\u82b1\u8d39\u5728\u8f93\u5165/\u8f93\u51fa\u64cd\u4f5c\u4e0a\u7684\u79d2\u6570\u3002\u8be5\u503c\u4e3a\u7d2f\u52a0\u503c\u3002\uff08Milliseconds Spent Doing I/Os\uff09\n\nirate(node_disk_io_time_seconds_total[1m])\uff1a\n\u8ba1\u7b97\u6bcf\u79d2\u7684\u901f\u7387\uff1a(last\u503c-last\u524d\u4e00\u4e2a\u503c)/\u65f6\u95f4\u6233\u5dee\u503c\uff0c\u5373\uff1a1\u79d2\u949f\u5185\u78c1\u76d8\u82b1\u8d39\u5728I/O\u64cd\u4f5c\u7684\u65f6\u95f4\u5360\u6bd4\u3002", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "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": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Idle - Waiting for something to happen" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#052B51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "guest" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#9AC48A", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "idle" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#052B51", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "iowait" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EAB839", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "irq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#BF1B00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "nice" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C15C17", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "sdb_\u6bcf\u79d2I/O\u64cd\u4f5c%" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#d683ce", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "softirq" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E24D42", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "steal" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FCE2DE", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "system" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#508642", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "user" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5195CE", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u82b1\u8d39\u5728I/O\u64cd\u4f5c\u5360\u6bd4" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#ba43a9", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsZero", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsNull", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 81 - }, - "id": 175, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "irate(node_disk_io_time_seconds_total{instance=~\"$node\"}[$interval])", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_\u6bcf\u79d2I/O\u64cd\u4f5c%", - "refId": "C" - } - ], - "title": "\u6bcf1\u79d2\u5185I/O\u64cd\u4f5c\u8017\u65f6\u5360\u6bd4\uff08I/O Util\uff09", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "Sockets_used - \u5df2\u4f7f\u7528\u7684\u6240\u6709\u534f\u8bae\u5957\u63a5\u5b57\u603b\u91cf\n\nCurrEstab - \u5f53\u524d\u72b6\u6001\u4e3a ESTABLISHED \u6216 CLOSE-WAIT \u7684 TCP \u8fde\u63a5\u6570\n\nTCP_alloc - \u5df2\u5206\u914d\uff08\u5df2\u5efa\u7acb\u3001\u5df2\u7533\u8bf7\u5230sk_buff\uff09\u7684TCP\u5957\u63a5\u5b57\u6570\u91cf\n\nTCP_tw - \u7b49\u5f85\u5173\u95ed\u7684TCP\u8fde\u63a5\u6570\n\nUDP_inuse - \u6b63\u5728\u4f7f\u7528\u7684 UDP \u5957\u63a5\u5b57\u6570\u91cf\n\nRetransSegs - TCP \u91cd\u4f20\u62a5\u6587\u6570\n\nOutSegs - TCP \u53d1\u9001\u7684\u62a5\u6587\u6570\n\nInSegs - TCP \u63a5\u6536\u7684\u62a5\u6587\u6570", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "CurrEstab", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "TCP_alloc" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*Sockets_used/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E02F44", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - }, - { - "id": "custom.axisLabel", - "value": "\u5df2\u4f7f\u7528\u7684\u6240\u6709\u534f\u8bae\u5957\u63a5\u5b57\u603b\u91cf" - }, - { - "id": "custom.showPoints", - "value": "always" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 16, - "x": 0, - "y": 89 - }, - "id": 158, - "interval": "", - "options": { - "legend": { - "calcs": [ - "last", - "max" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_netstat_Tcp_CurrEstab{instance=~\"$node\"}", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "CurrEstab", - "refId": "A", - "step": 20 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_sockstat_TCP_tw{instance=~\"$node\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "TCP_tw", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "node_sockstat_sockets_used{instance=~\"$node\"}", - "hide": false, - "interval": "2m", - "intervalFactor": 1, - "legendFormat": "Sockets_used", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_sockstat_UDP_inuse{instance=~\"$node\"}", - "interval": "", - "legendFormat": "UDP_inuse", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "node_sockstat_TCP_alloc{instance=~\"$node\"}", - "interval": "", - "legendFormat": "TCP_alloc", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_netstat_Tcp_PassiveOpens{instance=~\"$node\"}[$interval])", - "hide": true, - "interval": "", - "legendFormat": "{{instance}}_Tcp_PassiveOpens", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_netstat_Tcp_ActiveOpens{instance=~\"$node\"}[$interval])", - "hide": true, - "interval": "", - "legendFormat": "{{instance}}_Tcp_ActiveOpens", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_netstat_Tcp_InSegs{instance=~\"$node\"}[$interval])", - "interval": "", - "legendFormat": "Tcp_InSegs", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_netstat_Tcp_OutSegs{instance=~\"$node\"}[$interval])", - "interval": "", - "legendFormat": "Tcp_OutSegs", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_netstat_Tcp_RetransSegs{instance=~\"$node\"}[$interval])", - "hide": false, - "interval": "", - "legendFormat": "Tcp_RetransSegs", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_netstat_TcpExt_ListenDrops{instance=~\"$node\"}[$interval])", - "hide": true, - "interval": "", - "legendFormat": "", - "refId": "K" - } - ], - "title": "\u7f51\u7edcSocket\u8fde\u63a5\u4fe1\u606f", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "\u4e0a\u4f20\uff08-\uff09/\u4e0b\u8f7d\uff08+\uff09", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "bps" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_out\u4e0a\u4f20$/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsZero", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byValue", - "options": { - "op": "gte", - "reducer": "allIsNull", - "value": 0 - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": true, - "tooltip": true, - "viz": false - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_in\u4e0b\u8f7d$/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "yellow", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 89 - }, - "id": 157, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "maxHeight": 600, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.0.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "irate(node_network_receive_bytes_total{instance=~\"$node\",device=~\"$device\"}[$interval])*8", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_in\u4e0b\u8f7d", - "refId": "A", - "step": 4 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "irate(node_network_transmit_bytes_total{instance=~\"$node\",device=~\"$device\"}[$interval])*8", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device}}_out\u4e0a\u4f20", - "refId": "B", - "step": 4 - } - ], - "title": "\u6bcf\u79d2\u7f51\u7edc\u5e26\u5bbd\u4f7f\u7528$device", - "type": "timeseries" - } - ], - "title": "\ud83e\uddee\u8d44\u6e90\u660e\u7ec6\uff1a\u3010$show_hostname\u3011\u3010$node\u3011", - "type": "row" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 59 - }, - "title": "K8S \u96c6\u7fa4", - "type": "row", - "panels": [], - "id": 22 - }, - { - "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "WAYOn0FGz" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 60 - }, - "id": 23, - "panels": [], - "title": "\u8282\u70b9\u8d44\u6e90\u603b\u89c8\uff1a\u6240\u9009\u8282\u70b9:\u3010$Node\u3011", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 0.8 - }, - { - "color": "red", - "value": 0.9 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 61 - }, "id": 24, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"}) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u4f7f\u7528\u7387", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"}) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u8bf7\u6c42\u7387", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"}) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5185\u5b58\u9650\u5236\u7387", - "refId": "B", - "step": 10 - } - ], - "title": "\u8282\u70b9\u5185\u5b58\u6bd4\u4f8b", - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 0.7 - }, - { - "color": "red", - "value": 0.9 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 61 - }, - "id": 25, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum (irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"}[2m])) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})", - "format": "time_series", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU\u4f7f\u7528\u7387", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"}) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "CPU\u8bf7\u6c42\u7387", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"}) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})", - "format": "time_series", - "instant": true, - "interval": "", - "legendFormat": "CPU\u9650\u5236\u7387", - "refId": "B" - } - ], - "title": "\u8282\u70b9CPU\u6bd4\u4f8b", - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "\u96c6\u7fa4\u8282\u70b9\u6570\uff0c\u8282\u70b9POD\u6570\uff0c\u8282\u70b9POD\u4e0a\u9650", - "fieldConfig": { - "defaults": { - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 1000 - }, - { - "color": "red", - "value": 2000 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 8, - "y": 61 - }, - "id": 26, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "count(kube_node_info{origin_prometheus=~\"$origin_prometheus\"})", - "instant": true, - "interval": "", - "legendFormat": "\u8282\u70b9\u6570", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "count(kube_pod_info{origin_prometheus=~\"$origin_prometheus\",created_by_kind!~\"|Job\",node=~\"^$Node$\"})", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Pod\u6570", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"pods\", unit=\"integer\",node=~\"^$Node$\"})", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u4e0a\u9650Pod", - "refId": "C" - } - ], - "title": "\u8282\u70b9\u4e0ePod", - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u7a7a\u95f4" - }, - "properties": [ - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Pod" - }, - "properties": [ - { - "id": "custom.width", - "value": 21 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SVC" - }, - "properties": [ - { - "id": "custom.width", - "value": 7 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5fae\u670d\u52a1" - }, - "properties": [ - { - "id": "custom.width", - "value": 4 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u914d\u7f6e" - }, - "properties": [ - { - "id": "custom.width", - "value": 16 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5bc6\u7801" - }, - "properties": [ - { - "id": "custom.width", - "value": 33 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 11, - "y": 61 - }, - "id": 27, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": true - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "\u5fae\u670d\u52a1" - } - ] - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "count(kube_pod_info{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\"}) by (namespace)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "count(kube_service_info{origin_prometheus=~\"$origin_prometheus\"}) by(namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "count by (namespace)({__name__=~\"kube_deployment_metadata_generation|kube_daemonset_metadata_generation|kube_statefulset_metadata_generation\",origin_prometheus=~\"$origin_prometheus\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "__auto", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "count(kube_configmap_info{origin_prometheus=~\"$origin_prometheus\"}) by(namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "configmap", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "count(kube_secret_info{origin_prometheus=~\"$origin_prometheus\"}) by(namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "secret", - "refId": "E" - } - ], - "title": "\u547d\u540d\u7a7a\u95f4\u8d44\u6e90\u7edf\u8ba1", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "namespace" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Time 1": true, - "Time 2": true, - "Time 3": true, - "Time 4": true, - "Time 5": true - }, - "includeByName": {}, - "indexByName": { - "Time 1": 2, - "Time 2": 4, - "Time 3": 6, - "Value #A": 3, - "Value #C": 5, - "Value #D": 1, - "namespace": 0 - }, - "renameByName": { - "Time 1": "", - "Time 2": "", - "Value #A": "Pod", - "Value #B": "\u914d\u7f6e", - "Value #C": "SVC", - "Value #D": "\u5fae\u670d\u52a1", - "Value #E": "\u5bc6\u7801", - "namespace": "\u7a7a\u95f4" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 2, - "pointSize": 4, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "binbps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 61 - }, - "id": 28, - "options": { - "legend": { - "calcs": [ - "max" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum (irate(container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m]))*8", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u63a5\u6536", - "metric": "network", - "range": true, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum (irate(container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m]))*8", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u53d1\u9001", - "metric": "network", - "refId": "B", - "step": 10 - } - ], - "title": "$NameSpace\uff1a\u7f51\u7edc\u603b\u89c8\uff08\u53ef\u5173\u8054\u8282\u70b9\u4e0e\u547d\u540d\u7a7a\u95f4\uff09", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "max": 2000000000000, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 100000000000 - }, - { - "color": "red", - "value": 2000000000000 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 65 - }, - "id": 29, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u603b\u5185\u5b58", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u4f7f\u7528\u91cf", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u8bf7\u6c42\u91cf", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u9650\u5236\u91cf", - "refId": "B" - } - ], - "title": "\u8282\u70b9\u5185\u5b58\u4fe1\u606f", - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "max": 500, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 500 - }, - { - "color": "red", - "value": 1000 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 65 - }, - "id": 30, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u603b\u6838\u6570", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",id=\"/\",node=~\"^$Node$\"}[2m]))", - "instant": true, - "interval": "", - "legendFormat": "\u4f7f\u7528\u91cf", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u8bf7\u6c42\u91cf", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u9650\u5236\u91cf", - "refId": "B" - } - ], - "title": "\u8282\u70b9CPU\u6838\u6570", - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "max": 8000000000000, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 5000000000000 - }, - { - "color": "red", - "value": 10000000000000 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u91cf" - }, - "properties": [ - { - "id": "decimals", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 8, - "y": 65 - }, - "id": 31, - "options": { - "displayMode": "basic", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showUnfilled": false, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "sum (container_fs_usage_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"}) / sum (container_fs_limit_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u4f7f\u7528\u7387", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "sum (container_fs_usage_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u4f7f\u7528\u91cf", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "sum (container_fs_limit_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"})", - "instant": true, - "interval": "", - "legendFormat": "\u603b\u91cf", - "refId": "B" - } - ], - "title": "\u8282\u70b9\u5b58\u50a8\u4fe1\u606f", - "type": "bargauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/\u5f02\u5e38.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 69 - }, - "id": 32, - "maxPerRow": 2, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": {}, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.4.1", - "repeat": "origin_prometheus", - "repeatDirection": "v", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count({__name__=~\"kube_deployment_metadata_generation|kube_daemonset_metadata_generation|kube_statefulset_metadata_generation\",origin_prometheus=~\"$origin_prometheus\"})", - "hide": false, - "instant": true, - "legendFormat": "\u5de5\u4f5c\u8d1f\u8f7d", - "range": false, - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(kube_pod_info{origin_prometheus=~\"$origin_prometheus\"})", - "hide": false, - "instant": true, - "legendFormat": "\u603bPod", - "range": false, - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count by(key,origin_prometheus)(kube_node_spec_taint{origin_prometheus=~\"$origin_prometheus\",key=~\"node.kubernetes.io.*\"})", - "format": "time_series", - "hide": false, - "instant": true, - "legendFormat": "{{key}}", - "range": false, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count by(origin_prometheus)(kube_node_info{origin_prometheus=~\"$origin_prometheus\"})", - "hide": false, - "instant": true, - "legendFormat": "\u603b\u8282\u70b9", - "range": false, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count by(origin_prometheus)(kube_node_info{origin_prometheus=~\"$origin_prometheus\"}) - count by(origin_prometheus)(kube_node_spec_taint{origin_prometheus=~\"$origin_prometheus\",key!~\"node.kubernetes.io.*\"})", - "hide": false, - "instant": true, - "legendFormat": "\u6b63\u5e38\u8282\u70b9", - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count by(key,origin_prometheus)(kube_node_spec_taint{origin_prometheus=~\"$origin_prometheus\",key!~\"node.kubernetes.io.*\"})", - "hide": false, - "instant": true, - "legendFormat": "{{key}}", - "range": false, - "refId": "A" - } - ], - "transformations": [ - { - "id": "renameByRegex", - "options": { - "regex": "(node.kubernetes.io/)(.*)", - "renamePattern": "\u5f02\u5e38:$2" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 15, - "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": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u603b\u5185\u5b58" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 71 - }, - "id": 33, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})", - "instant": false, - "interval": "", - "legendFormat": "\u603b\u5185\u5b58", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"})", - "instant": false, - "interval": "", - "legendFormat": "\u4f7f\u7528\u91cf", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"})", - "hide": true, - "instant": false, - "interval": "", - "legendFormat": "\u8bf7\u6c42\u91cf", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"})", - "hide": true, - "instant": false, - "interval": "", - "legendFormat": "\u9650\u5236\u91cf", - "refId": "B" - } - ], - "title": "\u5185\u5b58\u4f7f\u7528\u91cf\u3010$Node\u3011", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 15, - "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": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u603b\u6838\u6570" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 8, - "x": 8, - "y": 71 - }, - "id": 34, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})", - "instant": false, - "interval": "", - "legendFormat": "\u603b\u6838\u6570", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",id=\"/\",node=~\"^$Node$\"}[2m]))", - "instant": false, - "interval": "", - "legendFormat": "\u4f7f\u7528\u91cf", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"})", - "hide": true, - "instant": false, - "interval": "", - "legendFormat": "\u8bf7\u6c42\u91cf", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"})", - "hide": true, - "instant": true, - "interval": "", - "legendFormat": "\u9650\u5236\u91cf", - "refId": "B" - } - ], - "title": "CPU\u4f7f\u7528\u6838\u3010$Node\u3011", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "description": "\u96c6\u7fa4\u8282\u70b9\u6570\uff0c\u8282\u70b9POD\u6570\uff0c\u8282\u70b9POD\u4e0a\u9650", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 15, - "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": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u4e0a\u9650Pod" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8282\u70b9\u6570" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "custom.drawStyle", - "value": "points" - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "custom.pointSize", - "value": 3 - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 8, - "x": 16, - "y": 71 - }, - "id": 35, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "count(kube_node_info{origin_prometheus=~\"$origin_prometheus\"})", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "\u8282\u70b9\u6570", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count(kube_pod_info{origin_prometheus=~\"$origin_prometheus\",created_by_kind!~\"|Job\",node=~\"^$Node$\"})", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "Pod\u6570", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"pods\", unit=\"integer\",node=~\"^$Node$\"})", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "\u4e0a\u9650Pod", - "refId": "C" - } - ], - "title": "Pod\u6570\u4e0e\u8282\u70b9\u6570\u3010$Node\u3011", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/\u603b\u6838\u6570.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C4162A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 76 - }, - "id": 36, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"}[2m]))by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})by (node)*100", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "{{node}}", - "refId": "I" - } - ], - "title": "$Node\uff1a\u8282\u70b9CPU\u660e\u7ec6", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 76 - }, - "id": 37, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"})by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})by (node)*100", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "{{node}}", - "refId": "I" - } - ], - "title": "$Node\uff1a\u8282\u70b9\u5185\u5b58\u660e\u7ec6", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "\u2190\u6d41\u5165/\u6d41\u51fa\u2192", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "binbps" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/\u6d41\u5165.*/" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 76 - }, - "id": 38, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (irate(container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\"}[2m]))by (node) *8", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6d41\u5165:{{node}}", - "metric": "network", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum (irate(container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\"}[2m]))by (node) *8", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6d41\u51fa:{{node}}", - "metric": "network", - "refId": "B", - "step": 10 - } - ], - "title": "$Node\uff1a\u8282\u70b9\u7f51\u7edc\u603b\u89c8", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "CPU\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 76 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 71 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 74 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 74 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*%" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "custom.width", - "value": 85 - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(\u5185\u5b58\u4f7f\u7528|\u5185\u5b58\u603b|\u5185\u5b58\u8bf7\u6c42|\u5185\u5b58\u9650\u5236|\u78c1\u76d8\u4f7f\u7528|\u78c1\u76d8\u603b)" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8282\u70b9" - }, - "properties": [ - { - "id": "custom.width", - "value": 96 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u8bf7\u6c42" - }, - "properties": [ - { - "id": "custom.width", - "value": 76 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU\u8bf7\u6c42" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(CPU\u603b|\u5185\u5b58\u603b|\u78c1\u76d8\u603b|Pod\u4e0a\u9650)" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "blue" - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Pod\u4e0a\u9650" - }, - "properties": [ - { - "id": "custom.width", - "value": 66 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "CPU\u6838\u4f7f\u7528$|\u5185\u5b58\u4f7f\u7528$|\u78c1\u76d8\u4f7f\u7528$|Pod\u6570" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u603b/" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Pod\u6570" - }, - "properties": [ - { - "id": "custom.width", - "value": 58 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU\u6838\u603b" - }, - "properties": [ - { - "id": "custom.width", - "value": 69 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u603b" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u603b" - }, - "properties": [ - { - "id": "custom.width", - "value": 74 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU\u6838\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 74 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u4f7f\u7528%" - }, - "properties": [ - { - "id": "custom.width", - "value": 102 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 82 - }, - "id": 39, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "\u5185\u5b58\u4f7f\u7528%" - } - ] - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "count(kube_pod_info{origin_prometheus=~\"$origin_prometheus\",created_by_kind!~\"|Job\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "pod\u6570", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "kube_node_status_condition{origin_prometheus=~\"$origin_prometheus\",status=\"true\",node=~\"^$Node$\"} == 1", - "format": "table", - "hide": true, - "instant": true, - "interval": "", - "legendFormat": "\u72b6\u6001", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"}[2m])) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"} - 0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"}) by (node) - 0", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_fs_usage_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_fs_limit_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"}) by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "L" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"})by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u4f7f\u7528%", - "refId": "M" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"})by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u8bf7\u6c42%", - "refId": "N" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",node=~\"^$Node$\"})by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\", node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u9650\u5236%", - "refId": "O" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container!=\"\",node=~\"^$Node$\"}[2m]))by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU\u4f7f\u7528%", - "refId": "P" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"})by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU\u8bf7\u6c42%", - "refId": "Q" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",node=~\"^$Node$\"})by (node) / sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\", node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5185\u5b58\u9650\u5236%", - "refId": "R" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_fs_usage_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"})by (node) / sum (container_fs_limit_bytes{origin_prometheus=~\"$origin_prometheus\",device=~\"^/dev/.*$\",id=\"/\",node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u78c1\u76d8\u4f7f\u7528%", - "refId": "S" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_node_status_allocatable{origin_prometheus=~\"$origin_prometheus\",resource=\"pods\", unit=\"integer\",node=~\"^$Node$\"})by (node)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Pod\u4e0a\u9650", - "refId": "T" - } - ], - "title": "$Node\uff1a\u8282\u70b9\u4fe1\u606f\u660e\u7ec6", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Time 1": true, - "Time 10": true, - "Time 11": true, - "Time 12": true, - "Time 13": true, - "Time 14": true, - "Time 15": true, - "Time 16": true, - "Time 17": true, - "Time 18": true, - "Time 19": true, - "Time 2": true, - "Time 20": true, - "Time 3": true, - "Time 4": true, - "Time 5": true, - "Time 6": true, - "Time 7": true, - "Time 8": true, - "Time 9": true, - "Value #B": true, - "Value #E": false, - "Value #F": false, - "__name__": true, - "app_kubernetes_io_name": true, - "app_kubernetes_io_name 1": true, - "app_kubernetes_io_name 2": true, - "app_kubernetes_io_name 3": true, - "app_kubernetes_io_version": true, - "app_kubernetes_io_version 1": true, - "app_kubernetes_io_version 2": true, - "app_kubernetes_io_version 3": true, - "condition": true, - "instance": true, - "instance 1": true, - "instance 2": true, - "instance 3": true, - "job": true, - "job 1": true, - "job 2": true, - "job 3": true, - "k8s_namespace": true, - "k8s_namespace 1": true, - "k8s_namespace 2": true, - "k8s_namespace 3": true, - "k8s_sname": true, - "k8s_sname 1": true, - "k8s_sname 2": true, - "k8s_sname 3": true, - "origin_prometheus": true, - "origin_prometheus 1": true, - "origin_prometheus 2": true, - "origin_prometheus 3": true, - "resource": true, - "status": true, - "unit": true - }, - "includeByName": {}, - "indexByName": { - "Time": 22, - "Value #A": 2, - "Value #C": 6, - "Value #D": 8, - "Value #E": 16, - "Value #F": 17, - "Value #G": 18, - "Value #H": 19, - "Value #I": 7, - "Value #J": 9, - "Value #K": 11, - "Value #L": 10, - "Value #M": 4, - "Value #N": 13, - "Value #O": 15, - "Value #P": 3, - "Value #Q": 12, - "Value #R": 14, - "Value #S": 5, - "Value #T": 1, - "instance": 23, - "job": 24, - "node": 0, - "origin_prometheus": 25, - "resource": 20, - "unit": 21 - }, - "renameByName": { - "Value #A": "Pod\u6570", - "Value #C": "CPU\u6838\u603b", - "Value #D": "\u5185\u5b58\u603b", - "Value #E": "CPU\u8bf7\u6c42", - "Value #F": "CPU\u9650\u5236", - "Value #G": "\u5185\u5b58\u8bf7\u6c42", - "Value #H": "\u5185\u5b58\u9650\u5236", - "Value #I": "CPU\u6838\u4f7f\u7528", - "Value #J": "\u5185\u5b58\u4f7f\u7528", - "Value #K": "\u78c1\u76d8\u4f7f\u7528", - "Value #L": "\u78c1\u76d8\u603b", - "Value #M": "\u5185\u5b58\u4f7f\u7528%", - "Value #N": "\u5185\u5b58\u8bf7\u6c42%", - "Value #O": "\u5185\u5b58\u9650\u5236%", - "Value #P": "CPU\u4f7f\u7528%", - "Value #Q": "CPU\u8bf7\u6c42%", - "Value #R": "CPU\u9650\u5236%", - "Value #S": "\u78c1\u76d8\u4f7f\u7528%", - "Value #T": "Pod\u4e0a\u9650", - "condition": "\u72b6\u6001", - "node": "\u8282\u70b9" - } - } - }, - { - "id": "filterFieldsByName", - "options": {} - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-background" - }, - "inspect": false - }, - "decimals": 0, - "links": [], - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 0 - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "color": "red", - "index": 1 - } - }, - "type": "special" - } - ], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u7387" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.width", - "value": 54 - }, - { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } - }, - { - "id": "decimals" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "from": 75, - "result": { - "color": "semi-dark-red", - "index": 0 - }, - "to": 110 - }, - "type": "range" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u6302\u8f7dPod\u6570" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.width", - "value": 59 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u547d\u540d\u7a7a\u95f4" - }, - "properties": [ - { - "id": "custom.width", - "value": 58 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "PVC" - }, - "properties": [ - { - "id": "custom.width", - "value": 94 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u91cf" - }, - "properties": [ - { - "id": "custom.width", - "value": 57 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u91cf" - }, - "properties": [ - { - "id": "custom.width", - "value": 54 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 93 - }, - "id": 40, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "\u4f7f\u7528\u7387" - } - ] - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max by (namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{origin_prometheus=~\"$origin_prometheus\"})", - "format": "table", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{namespace}}:{{ persistentvolumeclaim }}", - "metric": "container_memory_usage:sort_desc", - "range": false, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "min by (namespace,persistentvolumeclaim) (kubelet_volume_stats_available_bytes{origin_prometheus=~\"$origin_prometheus\"}) + max by (namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{origin_prometheus=~\"$origin_prometheus\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "__auto", - "metric": "container_memory_usage:sort_desc", - "range": false, - "refId": "B", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max by (namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{origin_prometheus=~\"$origin_prometheus\"}) /(min by (namespace,persistentvolumeclaim) (kubelet_volume_stats_available_bytes{origin_prometheus=~\"$origin_prometheus\"}) + max by (namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{origin_prometheus=~\"$origin_prometheus\"}))*100", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{namespace}}:{{ persistentvolumeclaim }}", - "metric": "container_memory_usage:sort_desc", - "range": false, - "refId": "C", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count by (namespace,persistentvolumeclaim)(kube_pod_spec_volumes_persistentvolumeclaims_info{origin_prometheus=~\"$origin_prometheus\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "__auto", - "metric": "container_memory_usage:sort_desc", - "range": false, - "refId": "D", - "step": 10 - } - ], - "title": "PVC\u5b58\u50a8\u4f7f\u7528\u60c5\u51b5", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true - }, - "includeByName": {}, - "indexByName": {}, - "renameByName": { - "Value #A": "\u4f7f\u7528\u91cf", - "Value #B": "\u603b\u91cf", - "Value #C": "\u4f7f\u7528\u7387", - "Value #D": "\u6302\u8f7dPod\u6570", - "namespace": "\u547d\u540d\u7a7a\u95f4", - "persistentvolumeclaim": "PVC" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 6, - "y": 93 - }, - "id": 41, - "options": { - "legend": { - "calcs": [ - "last", - "max" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container !=\"\",container!=\"POD\"}[2m])) by (namespace)>0.5", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ namespace }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "title": "\u5404\u547d\u540d\u7a7a\u95f4CPU\u4f7f\u7528\u6838(>0.5)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 9, - "x": 15, - "y": 93 - }, - "id": 42, - "options": { - "legend": { - "calcs": [ - "last", - "max" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container !=\"\",container!=\"POD\"}) by (namespace) > 1*1024*1024*1024", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{namespace} {{ pod }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "A", - "step": 10 - } - ], - "title": "\u547d\u540d\u7a7a\u95f4WSS\u5185\u5b58\u4f7f\u7528(>1G)", - "type": "timeseries" - }, - { + "type": "row", + "title": "\u4e1a\u52a1\u5355\u5143", "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "WAYOn0FGz" - }, + "panels": [], "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 101 - }, - "id": 43, - "panels": [], - "title": "Pod\u8d44\u6e90\u603b\u89c8\uff1a\u6240\u9009Pod:\u3010$Pod\u3011", - "type": "row" + "y": 51 + } }, { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" + "id": 25, + "type": "text", + "title": "\u4ee3\u7406\u6458\u8981", + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 52 }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "\u547d\u540d\u7a7a\u95f4" - }, - "properties": [ - { - "id": "custom.width", - "value": 96 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Pod\u540d\u79f0" - }, - "properties": [ - { - "id": "custom.width", - "value": 207 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u6838\u6570" - }, - "properties": [ - { - "id": "custom.width", - "value": 71 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u91cd\u542f" - }, - "properties": [ - { - "id": "custom.width", - "value": 38 - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 1 - }, - { - "color": "red", - "value": 3 - } - ] - } - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*%" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.width", - "value": 55 - }, - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*\u9650\u5236" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u8282\u70b9" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "\u4f7f\u7528\u6838$|WSS$|RSS$|\u5b58\u6d3b|\u6d41\u5165|\u6d41\u51fa" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5bb9\u5668\u540d" - }, - "properties": [ - { - "id": "custom.width", - "value": 57 - }, - { - "id": "custom.align", - "value": "left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5b58\u6d3b" - }, - "properties": [ - { - "id": "unit", - "value": "s" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u4f7f\u7528\u6838" - }, - "properties": [ - { - "id": "custom.width", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 58 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 68 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5185\u5b58\u9700\u6c42" - }, - "properties": [ - { - "id": "custom.width", - "value": 88 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "WSS$|RSS$|\u5185\u5b58\u9700\u6c42$|\u5185\u5b58\u9650\u5236$|\u78c1\u76d8.*$" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "WSS" - }, - "properties": [ - { - "id": "custom.width", - "value": 81 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "RSS" - }, - "properties": [ - { - "id": "custom.width", - "value": 74 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU\u9700\u6c42" - }, - "properties": [ - { - "id": "custom.width", - "value": 72 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 83 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u78c1\u76d8\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 72 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 10737418240 - }, - { - "color": "red", - "value": 16106127360 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "WSS%" - }, - "properties": [ - { - "id": "custom.width", - "value": 77 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/\u6d41\u5165|\u6d41\u51fa/" - }, - "properties": [ - { - "id": "unit", - "value": "binbps" - }, - { - "id": "custom.width", - "value": 80 - } - ] - } - ] + "transparent": true, + "options": { + "content": "\n
\n
\u4e1a\u52a1\u5355\u5143 / \u4ee3\u7406
\n
\u4ee3\u7406
\n
Nginx\u3001HAProxy \u4e0e\u6d41\u91cf\u63a5\u5165\u5c42
\n
  • Nginx Instance
  • Node HAProxy
\n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 26, + "type": "text", + "title": "\u8bf7\u6c42\u6458\u8981", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 52 }, + "transparent": true, + "options": { + "content": "\n
\n
\u4e1a\u52a1\u5355\u5143 / \u8bf7\u6c42
\n
\u8bf7\u6c42
\n
\u8bf7\u6c42\u65e5\u5fd7\u3001\u4f1a\u8bdd\u3001\u94fe\u8def\u4e0e\u8bf7\u6c42\u7ea7\u89c2\u6d4b
\n
  • PGLOG Overview
  • Logs Instance
  • Node Vector
\n
\n \u53f3\u4fa7\u4fdd\u7559\u53ef\u8df3\u8f6c\u76ee\u5f55\n
\n
\n", + "mode": "html" + } + }, + { + "id": 27, + "type": "dashlist", + "title": "\u4ee3\u7406\u76ee\u5f55", + "pluginVersion": "12.3.0", "gridPos": { "h": 8, - "w": 24, + "w": 12, "x": 0, - "y": 102 + "y": 57 }, - "id": 44, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "WSS%" - } + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "BU-PROXY" ] - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (container, pod,node,namespace) / (sum(container_spec_cpu_quota{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}/100000) by (container, pod,node,namespace)) ", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (container, pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "CPU\u6838\u6570\u4f7f\u7528", - "refId": "Q" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",pod=~\"$Pod\",container =~\"$Container\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",pod=~\"$Pod\",container =~\"$Container\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)/ sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "wss%", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "wss", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)/ sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "rss%", - "refId": "L" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "rss", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",pod=~\"$Pod\",container =~\"$Container\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",pod=~\"$Pod\",container =~\"$Container\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(container_fs_usage_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "kube_pod_container_status_restarts_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"} * on (pod) group_left(node) kube_pod_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "time() - kube_pod_created{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\"} * on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\",container =~\"$Container\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "__auto", - "refId": "R" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(container_fs_limit_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "S" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(sum(irate(container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\",container =~\"$Container\"}) by(pod) *8", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "__auto", - "refId": "T" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(sum(irate(container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\",container =~\"$Container\"}) by(pod) *8", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "__auto", - "refId": "U" - } - ], - "title": "$Node\uff1aPod\u8d44\u6e90\u660e\u7ec6(\u53ef\u5173\u8054\u8282\u70b9)", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Time 1": true, - "Time 10": true, - "Time 11": true, - "Time 12": true, - "Time 13": true, - "Time 2": true, - "Time 3": true, - "Time 4": true, - "Time 5": true, - "Time 6": true, - "Time 7": true, - "Time 8": true, - "Time 9": true, - "Value #G": false, - "__name__": true, - "app_kubernetes_io_name": true, - "app_kubernetes_io_name 1": true, - "app_kubernetes_io_name 2": true, - "app_kubernetes_io_version": true, - "app_kubernetes_io_version 1": true, - "app_kubernetes_io_version 2": true, - "container 1": true, - "container 10": true, - "container 11": true, - "container 12": true, - "container 2": true, - "container 3": true, - "container 4": true, - "container 5": true, - "container 6": true, - "container 7": true, - "container 8": true, - "container 9": true, - "created_by_kind": true, - "created_by_name": true, - "host_ip": true, - "instance": true, - "instance 1": true, - "instance 2": true, - "job": true, - "job 1": true, - "job 2": true, - "k8s_namespace": true, - "k8s_namespace 1": true, - "k8s_namespace 2": true, - "k8s_sname": true, - "k8s_sname 1": true, - "k8s_sname 2": true, - "namespace": false, - "namespace 1": true, - "namespace 10": true, - "namespace 11": true, - "namespace 12": false, - "namespace 2": true, - "namespace 3": true, - "namespace 4": true, - "namespace 5": true, - "namespace 6": true, - "namespace 7": true, - "namespace 8": true, - "namespace 9": true, - "node 1": true, - "node 10": true, - "node 11": false, - "node 12": true, - "node 2": true, - "node 3": true, - "node 4": true, - "node 5": true, - "node 6": true, - "node 7": true, - "node 8": true, - "node 9": true, - "origin_prometheus": true, - "origin_prometheus 1": true, - "origin_prometheus 2": true, - "phase": true, - "pod_ip": true, - "priority_class": true, - "uid": true - }, - "includeByName": {}, - "indexByName": { - "Time": 21, - "Value #A": 4, - "Value #B": 16, - "Value #C": 7, - "Value #D": 10, - "Value #E": 17, - "Value #F": 9, - "Value #G": 23, - "Value #H": 14, - "Value #I": 5, - "Value #J": 13, - "Value #K": 11, - "Value #L": 6, - "Value #M": 24, - "Value #N": 25, - "Value #O": 26, - "Value #P": 27, - "Value #Q": 8, - "Value #R": 15, - "Value #S": 12, - "container": 2, - "instance": 18, - "ip": 28, - "job": 19, - "namespace": 1, - "node": 0, - "origin_prometheus": 20, - "pod": 3, - "uid": 22 - }, - "renameByName": { - "Value #A": "CPU%", - "Value #B": "CPU\u9700\u6c42", - "Value #C": "CPU\u9650\u5236", - "Value #D": "WSS", - "Value #E": "\u5185\u5b58\u9700\u6c42", - "Value #F": "\u5185\u5b58\u9650\u5236", - "Value #H": "\u91cd\u542f", - "Value #I": "WSS%", - "Value #J": "\u78c1\u76d8\u4f7f\u7528", - "Value #K": "RSS", - "Value #L": "RSS%", - "Value #M": "\u5806\u5185\u5b58", - "Value #N": "max\u5806", - "Value #O": "\u975e\u5806", - "Value #P": "max\u975e\u5806", - "Value #Q": "\u4f7f\u7528\u6838", - "Value #R": "\u5b58\u6d3b", - "Value #S": "\u78c1\u76d8\u9650\u5236", - "Value #T": "\u6d41\u5165", - "Value #U": "\u6d41\u51fa", - "container": "\u5bb9\u5668\u540d", - "instance": "", - "ip": "POD IP", - "namespace": "\u547d\u540d\u7a7a\u95f4", - "namespace 1": "", - "namespace 12": "\u547d\u540d\u7a7a\u95f4", - "node": "\u8282\u70b9", - "node 1": "", - "node 11": "\u8282\u70b9", - "pod": "Pod\u540d\u79f0", - "priority_class": "" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "\u8282\u70b9", - "\u547d\u540d\u7a7a\u95f4", - "\u5bb9\u5668\u540d", - "Pod\u540d\u79f0", - "CPU%", - "WSS%", - "RSS%", - "CPU\u9650\u5236", - "\u4f7f\u7528\u6838", - "\u5185\u5b58\u9650\u5236", - "WSS", - "RSS", - "\u78c1\u76d8\u9650\u5236", - "\u78c1\u76d8\u4f7f\u7528", - "\u91cd\u542f", - "CPU\u9700\u6c42", - "\u5185\u5b58\u9700\u6c42", - "\u6d41\u5165", - "\u6d41\u51fa", - "\u5b58\u6d3b" - ] - } - } - } - ], - "type": "table" + } }, { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, + "id": 28, + "type": "dashlist", + "title": "\u8bf7\u6c42\u76ee\u5f55", + "pluginVersion": "12.3.0", "gridPos": { "h": 9, - "w": 8, - "x": 0, - "y": 110 + "w": 12, + "x": 12, + "y": 57 }, - "id": 45, "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "max(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (container, pod) / (max(container_spec_cpu_quota{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}/100000) by (container, pod)) * 100", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ pod }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "title": "Pod\u5bb9\u5668CPU\u4f7f\u7528\u7387(\u6700\u5927100%\u53ef\u5173\u8054\u8282\u70b9)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 8, - "y": 110 - }, - "id": 46, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod)/ max(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod) * 100", - "interval": "", - "intervalFactor": 1, - "legendFormat": "WSS\uff1a{{ pod }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod)/ max(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod) * 100", - "interval": "", - "intervalFactor": 1, - "legendFormat": "RSS\uff1a{{ pod }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "B", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "(cass_jvm_heap{service=~\"$Container\"} * on (pod_ip) group_right(service) kube_pod_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\"}) / (cass_jvm_heap_max{service=~\"$Container\"} * on (pod_ip) group_right(service) kube_pod_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\"}) * 100", - "hide": true, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Heap\uff1a{{ pod }}", - "metric": "container_memory_usage:sort_desc", - "refId": "C", - "step": 10 - } - ], - "title": "Pod\u5bb9\u5668\u5185\u5b58\u4f7f\u7528\u7387(\u53ef\u5173\u8054\u8282\u70b9)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "binbps" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 16, - "y": 110 - }, - "id": 47, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(max(irate(container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\",container =~\"$Container\"}) by(pod) *8", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6d41\u5165:{{ pod}}", - "metric": "network", - "range": true, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(max(irate(container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",namespace=~\"$NameSpace\",container =~\"$Container\"}) by(pod) *8", - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6d41\u51fa:{{ pod}}", - "metric": "network", - "range": true, - "refId": "B", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "sum(sum(irate(container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",image!=\"\",name=~\"^k8s_.*\",node=~\"^$Node$\",namespace=~\"$NameSpace\",pod=~\".*$Container.*\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info) by(pod) *8", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "__auto", - "metric": "network", - "range": true, - "refId": "C", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "sum(sum(irate(container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",image!=\"\",name=~\"^k8s_.*\",node=~\"^$Node$\",namespace=~\"$NameSpace\",pod=~\".*$Container.*\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info) by(pod) *8", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "__auto", - "metric": "network", - "range": true, - "refId": "D", - "step": 10 - } - ], - "title": "Pod\u6bcf\u79d2\u7f51\u7edc\u5e26\u5bbd (\u53ef\u5173\u8054\u8282\u70b9)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/\u9650\u5236.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } + "includeVars": true, + "keepTime": true, + "maxItems": 20, + "query": "", + "showFolderNames": false, + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": false, + "showStarred": false, + "tags": [ + "BU-REQUEST" ] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 0, - "y": 119 - }, - "id": 48, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "max(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (container, pod,node,namespace)", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "CPU\u4f7f\u7528\uff1a{{ pod }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "max(max(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",pod=~\"$Pod\",container =~\"$Container\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)) by(container)", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Pod CPU\u9650\u5236\uff1a{{ container}}", - "metric": "container_cpu", - "refId": "B", - "step": 10 - } - ], - "title": "Pod\u5bb9\u5668CPU\u6838\u4f7f\u7528", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u9650\u5236/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 8, - "y": 119 - }, - "id": 49, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "WSS\uff1a{{ pod }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(max(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",pod=~\"$Pod\",container =~\"$Container\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container,pod,node,namespace)) by(container)", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Pod\u5185\u5b58\u9650\u5236\uff1a{{ container}}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "B", - "step": 10 - } - ], - "title": "Pod\u5bb9\u5668WSS\u5185\u5b58\u4f7f\u7528(\u53ef\u5173\u8054\u8282\u70b9)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 16, - "y": 119 - }, - "id": 50, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "max (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",container =~\"$Container\",container !=\"\",container!=\"POD\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}) by (container, pod,node,namespace)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "RSS\uff1a{{ pod }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "A", - "step": 10 - } - ], - "title": "Pod\u5bb9\u5668RSS\u5185\u5b58\u4f7f\u7528(\u53ef\u5173\u8054\u8282\u70b9)", - "type": "timeseries" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "WAYOn0FGz" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 128 - }, - "id": 51, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*%" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge", - "valueDisplayMode": "color" - } - }, - { - "id": "max", - "value": 1 - }, - { - "id": "min", - "value": 0 - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*\u5185\u5b58\u4f7f\u7528$|.*\u5185\u5b58\u9650\u5236$|.*\u5185\u5b58\u9700\u6c42$|.*\u78c1\u76d8\u4f7f\u7528$|.*\u78c1\u76d8\u9650\u5236$" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u547d\u540d\u7a7a\u95f4" - }, - "properties": [ - { - "id": "custom.width", - "value": 92 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5bb9\u5668\u540d" - }, - "properties": [ - { - "id": "custom.width", - "value": 187 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603bCPU\u6838\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Pod" - }, - "properties": [ - { - "id": "custom.width", - "value": 44 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } - }, - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747CPU\u4f7f\u7528%" - }, - "properties": [ - { - "id": "custom.width", - "value": 116 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747RSS\u5185\u5b58\u4f7f\u7528%" - }, - "properties": [ - { - "id": "custom.width", - "value": 141 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747WSS\u5185\u5b58\u4f7f\u7528%" - }, - "properties": [ - { - "id": "custom.width", - "value": 165 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603bCPU\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 86 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u5185\u5b58\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 86 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u9650\u5236$/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "blue", - "mode": "fixed" - } - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*\u5185\u5b58\u4f7f\u7528$|.*\u6838\u4f7f\u7528$/" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603bRSS\u5185\u5b58\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 107 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603bWSS\u5185\u5b58\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 113 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747\u78c1\u76d8\u4f7f\u7528" - }, - "properties": [ - { - "id": "custom.width", - "value": 96 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-background" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "orange", - "value": 10737418240 - }, - { - "color": "red", - "value": 16106127360 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u5e73\u5747\u78c1\u76d8\u9650\u5236" - }, - "properties": [ - { - "id": "custom.width", - "value": 96 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603bCPU\u9700\u6c42" - }, - "properties": [ - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "\u603b\u5185\u5b58\u9700\u6c42" - }, - "properties": [ - { - "id": "custom.width", - "value": 80 - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 87, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "\u5e73\u5747WSS\u5185\u5b58\u4f7f\u7528%" - } - ] - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}[2m])) by (container) / (sum(container_spec_cpu_quota{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}/100000) by (container))", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}[2m])) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u603b\u6838\u6570\u4f7f\u7528", - "refId": "L" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)/ sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)/ sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u5e73\u5747\u5185\u5b58%(RSS)", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "\u603b\u5185\u5b58\u4f7f\u7528(RSS) ", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by(container) (kube_pod_container_resource_requests{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": false, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"memory\", unit=\"byte\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "avg(container_fs_usage_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "count(kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by(container,namespace)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "avg(container_fs_limit_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "M" - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u8d44\u6e90\u7edf\u8ba1", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Time 1": true, - "Time 10": true, - "Time 11": true, - "Time 12": true, - "Time 2": true, - "Time 3": true, - "Time 4": true, - "Time 5": true, - "Time 6": true, - "Time 7": true, - "Time 8": true, - "Time 9": true - }, - "includeByName": {}, - "indexByName": { - "Time": 15, - "Value #A": 3, - "Value #B": 13, - "Value #C": 6, - "Value #D": 9, - "Value #E": 14, - "Value #F": 8, - "Value #G": 2, - "Value #H": 5, - "Value #I": 4, - "Value #J": 12, - "Value #K": 10, - "Value #L": 7, - "Value #M": 11, - "container": 1, - "namespace": 0 - }, - "renameByName": { - "Time 1": "", - "Value #A": "\u5e73\u5747CPU\u4f7f\u7528%", - "Value #B": "\u603bCPU\u9700\u6c42", - "Value #C": "\u603bCPU\u9650\u5236", - "Value #D": "\u603bWSS\u5185\u5b58\u4f7f\u7528", - "Value #E": "\u603b\u5185\u5b58\u9700\u6c42", - "Value #F": "\u603b\u5185\u5b58\u9650\u5236", - "Value #G": "Pod", - "Value #H": "\u5e73\u5747RSS\u5185\u5b58\u4f7f\u7528%", - "Value #I": "\u5e73\u5747WSS\u5185\u5b58\u4f7f\u7528%", - "Value #J": "\u5e73\u5747\u78c1\u76d8\u4f7f\u7528", - "Value #K": "\u603bRSS\u5185\u5b58\u4f7f\u7528", - "Value #L": "\u603bCPU\u6838\u4f7f\u7528", - "Value #M": "\u5e73\u5747\u78c1\u76d8\u9650\u5236", - "container": "\u5bb9\u5668\u540d", - "namespace": "\u547d\u540d\u7a7a\u95f4" - } - } - }, - { - "id": "filterFieldsByName", - "options": {} - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": 7, - "w": 8, - "x": 0, - "y": 12 - }, - "id": 24, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "exemplar": true, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}[2m])) by (container) / (sum(container_spec_cpu_quota{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}/100000) by (container)) * 100", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ container}}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u5e73\u5747CPU\u4f7f\u7528\u7387(\u6700\u5927100%)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": 7, - "w": 8, - "x": 8, - "y": 12 - }, - "id": 89, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)/ sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container) * 100", - "interval": "", - "intervalFactor": 1, - "legendFormat": "WSS\uff1a{{ container }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "sum (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)/ sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container) * 100", - "interval": "", - "intervalFactor": 1, - "legendFormat": "RSS\uff1a{{ container }}", - "metric": "container_memory_usage:sort_desc", - "refId": "B", - "step": 10 - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u5e73\u5747\u5185\u5b58\u4f7f\u7528\u7387", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "binbps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 12 - }, - "id": 16, - "options": { - "legend": { - "calcs": [ - "mean", - "last", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(sum(irate(container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",namespace=~\"$NameSpace\",container =~\"$Container\"}) by(container) *8", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6d41\u5165:{{ container }}", - "metric": "network", - "range": true, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(sum(irate(container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",node=~\"^$Node$\",namespace=~\"$NameSpace\"}[2m])) by (pod)* on(pod) group_right kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",namespace=~\"$NameSpace\",container =~\"$Container\"}) by(container) *8", - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u6d41\u51fa:{{ container }}", - "metric": "network", - "range": true, - "refId": "B", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "sum (rate (container_network_receive_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",image!=\"\",name=~\"^k8s_.*\",node=~\"^$Node$\",namespace=~\"$NameSpace\",pod=~\".*$Container.*\"}[2m])) by (pod)", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "-> {{ pod }}", - "metric": "network", - "refId": "C", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "expr": "- sum (rate (container_network_transmit_bytes_total{origin_prometheus=~\"$origin_prometheus\",pod=~\"$Pod\",image!=\"\",name=~\"^k8s_.*\",node=~\"^$Node$\",namespace=~\"$NameSpace\",pod=~\".*$Container.*\"}[2m])) by (pod)", - "hide": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "<- {{ pod }}", - "metric": "network", - "refId": "D", - "step": 10 - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u6bcf\u79d2\u7f51\u7edc\u5e26\u5bbd (\u53ef\u5173\u8054\u8282\u70b9)", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/CPU\u9650\u5236.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 19 - }, - "id": 91, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(kube_pod_container_resource_limits{origin_prometheus=~\"$origin_prometheus\",resource=\"cpu\", unit=\"core\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "CPU\u9650\u5236\uff1a{{ container}}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(irate(container_cpu_usage_seconds_total{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}[2m])) by (container)", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "CPU\u6838\u4f7f\u7528\uff1a{{ container}}", - "metric": "container_cpu", - "refId": "B", - "step": 10 - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u6574\u4f53CPU\u4f7f\u7528\u6838", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/\u5185\u5b58\u9650\u5236.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 19 - }, - "id": 90, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Max", - "sortDesc": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "sum (container_memory_working_set_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "WSS\uff1a{{ container }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "sum(container_spec_memory_limit_bytes{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "\u5185\u5b58\u9650\u5236\uff1a{{ container }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "B", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "sum (container_memory_rss{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by (container)", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "RSS\uff1a{{ container }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "C", - "step": 10 - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u6574\u4f53\u5185\u5b58\u4f7f\u7528\u91cf", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "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": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 19 - }, - "id": 59, - "options": { - "legend": { - "calcs": [ - "max", - "last", - "mean" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "ds-prometheus" - }, - "editorMode": "code", - "expr": "count(kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",container =~\"$Container\",container !=\"\",container!=\"POD\",namespace=~\"$NameSpace\"}) by(container,namespace)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{namespace}}\uff1a{{ container }}", - "metric": "container_memory_usage:sort_desc", - "range": true, - "refId": "A", - "step": 10 - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)Pod\u6570", - "type": "timeseries" - } - ], - "title": "\u5fae\u670d\u52a1(\u5bb9\u5668\u540d)\u8d44\u6e90\u603b\u89c8\uff1a\u6240\u9009\u5fae\u670d\u52a1:\u3010$Container\u3011", - "type": "row" + } } ], "schemaVersion": 39, "tags": [ "HOME", - "Pigsty" + "Platform" ], "templating": { "list": [ @@ -14725,113 +2396,11 @@ "query": "label_values(kube_node_info,origin_prometheus)", "refresh": 1 }, - { - "name": "NameSpace", - "label": "\u547d\u540d\u7a7a\u95f4", - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(kube_namespace_created{origin_prometheus=~\"$origin_prometheus\"},namespace)" - }, - { - "name": "Container", - "label": "\u670d\u52a1", - "description": "\u670d\u52a1\uff08\u5bb9\u5668\uff09", - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",namespace=~\"$NameSpace\"},container)" - }, - { - "name": "Pod", - "label": "Pod", - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",namespace=~\"$NameSpace\",container=~\"$Container\"},pod)" - }, - { - "name": "hostname", - "label": "\u4e3b\u673a\u540d", - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\"},nodename)" - }, - { - "name": "node", - "label": "\u5b9e\u4f8b IP", - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\", nodename=~\"$hostname\"},instance)" - }, - { - "name": "device", - "label": "\u7f51\u5361", - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(node_network_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\", instance=~\"$node\", device!~\"'tap.*|veth.*|br.*|docker.*|virbr.*|lo.*|cni.*'\"},device)" - }, { "name": "interval", "label": "\u91c7\u6837\u95f4\u9694", "type": "interval", "query": "3m,5m,10m,30m,1h,6h,12h,1d" - }, - { - "name": "job", - "label": "JOB\uff08\u9ad8\u7ea7\uff09", - "hide": 2, - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\"},job)" - }, - { - "name": "Node", - "label": "\u8282\u70b9\u6c60\uff08\u9ad8\u7ea7\uff09", - "hide": 2, - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(kube_node_info{origin_prometheus=~\"$origin_prometheus\"},node)" - }, - { - "name": "maxmount", - "hide": 2, - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "query_result(topk(1,sort_desc(max(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",instance=~\"$node\",fstype=~\"ext.?|xfs\",mountpoint!~\".*pods.*\"}) by (mountpoint))))" - }, - { - "name": "show_hostname", - "hide": 2, - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\", nodename=~\"$hostname\", instance=~\"$node\"},nodename)" - }, - { - "name": "total", - "hide": 2, - "type": "query", - "datasource": { - "uid": "ds-prometheus" - }, - "query": "query_result(count(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}))" } ] }, diff --git a/merge_dashboards.py b/merge_dashboards.py old mode 100755 new mode 100644 index 241895e..b4a191b --- a/merge_dashboards.py +++ b/merge_dashboards.py @@ -1,6 +1,131 @@ +import copy import json -import re -import os + + +CONTROL_PLANE_PATH = "files/grafana/11-paas-control-plane/pigsty.json" +OUTPUT_PATH = "files/grafana/homepage.json" + +VISIBLE_VARS = [ + { + "name": "version", + "type": "constant", + "query": "v4.0.0", + "hide": 2, + }, + { + "name": "origin_prometheus", + "label": "数据源", + "type": "query", + "datasource": {"uid": "ds-prometheus"}, + "query": "label_values(kube_node_info,origin_prometheus)", + "refresh": 1, + }, + { + "name": "interval", + "label": "采样间隔", + "type": "interval", + "query": "3m,5m,10m,30m,1h,6h,12h,1d", + }, +] + +DOMAIN_SECTIONS = [ + { + "title": "IAAS资源", + "items": [ + { + "title": "计算", + "description": "主机容量、节点健康、实例告警", + "folder_uid": "01-iaas-compute", + "folder_title": "IAAS / 计算", + "tag": "IAAS-COMPUTE", + "highlights": ["Node Overview", "Node Instance", "Node Alert"], + "dash_height": 9, + }, + { + "title": "存储", + "description": "磁盘、卷、对象存储、JuiceFS", + "folder_uid": "02-iaas-storage", + "folder_title": "IAAS / 存储", + "tag": "IAAS-STORAGE", + "highlights": ["Node Disk", "MinIO Overview", "Node JuiceFS"], + "dash_height": 9, + }, + { + "title": "网络", + "description": "VIP、节点网络、底层连通性", + "folder_uid": "03-iaas-network", + "folder_title": "IAAS / 网络", + "tag": "IAAS-NETWORK", + "highlights": ["Node VIP"], + "dash_height": 8, + }, + ], + }, + { + "title": "PaaS服务", + "items": [ + { + "title": "平台控制面", + "description": "Grafana、Victoria、Alertmanager、Etcd、CMDB", + "folder_uid": "11-paas-control-plane", + "folder_title": "PaaS / 平台控制面", + "tag": "PAAS-CONTROL-PLANE", + "highlights": ["Infra Overview", "Victoria Metrics", "Alert Manager"], + "dash_height": 10, + }, + { + "title": "集群", + "description": "K8S 集群资源、命名空间与工作负载入口", + "folder_uid": "12-paas-cluster", + "folder_title": "PaaS / 集群", + "tag": "PAAS-CLUSTER", + "highlights": ["K8S Dashboard"], + "dash_height": 8, + }, + { + "title": "DB", + "description": "PGSQL、PGRDS、PGCAT、Ferret", + "folder_uid": "13-paas-db", + "folder_title": "PaaS / DB", + "tag": "PAAS-DB", + "highlights": ["PGSQL Overview", "PGSQL Cluster", "PGCAT Instance"], + "dash_height": 14, + }, + { + "title": "缓存", + "description": "Redis 集群、实例与缓存服务运行面", + "folder_uid": "14-paas-cache", + "folder_title": "PaaS / 缓存", + "tag": "PAAS-CACHE", + "highlights": ["Redis Overview", "Redis Cluster"], + "dash_height": 9, + }, + ], + }, + { + "title": "业务单元", + "items": [ + { + "title": "代理", + "description": "Nginx、HAProxy 与流量接入层", + "folder_uid": "22-bu-proxy", + "folder_title": "业务单元 / 代理", + "tag": "BU-PROXY", + "highlights": ["Nginx Instance", "Node HAProxy"], + "dash_height": 8, + }, + { + "title": "请求", + "description": "请求日志、会话、链路与请求级观测", + "folder_uid": "24-bu-request", + "folder_title": "业务单元 / 请求", + "tag": "BU-REQUEST", + "highlights": ["PGLOG Overview", "Logs Instance", "Node Vector"], + "dash_height": 9, + }, + ], + }, +] def shift_panel(panel, delta_y): @@ -9,6 +134,17 @@ def shift_panel(panel, delta_y): shift_panel(nested, delta_y) +def clone_panel(panel, x, y, w=None, h=None): + cloned = copy.deepcopy(panel) + cloned["gridPos"] = { + "x": x, + "y": y, + "w": w if w is not None else panel["gridPos"]["w"], + "h": h if h is not None else panel["gridPos"]["h"], + } + return cloned + + def make_text_panel(panel_id, title, html, x, y, w, h, transparent=True): return { "id": panel_id, @@ -16,166 +152,214 @@ def make_text_panel(panel_id, title, html, x, y, w, h, transparent=True): "title": title, "gridPos": {"h": h, "w": w, "x": x, "y": y}, "transparent": transparent, - "options": { - "content": html, - "mode": "html" - } + "options": {"content": html, "mode": "html"}, } +def make_row_panel(panel_id, title, y): + return { + "id": panel_id, + "type": "row", + "title": title, + "collapsed": False, + "panels": [], + "gridPos": {"h": 1, "w": 24, "x": 0, "y": y}, + } + + +def make_dashlist_panel(panel_id, title, tags, x, y, w, h, max_items=12): + return { + "id": panel_id, + "type": "dashlist", + "title": title, + "pluginVersion": "12.3.0", + "gridPos": {"h": h, "w": w, "x": x, "y": y}, + "options": { + "includeVars": True, + "keepTime": True, + "maxItems": max_items, + "query": "", + "showFolderNames": False, + "showHeadings": False, + "showRecentlyViewed": False, + "showSearch": False, + "showStarred": False, + "tags": tags, + }, + } + + +def summary_card_html(item): + highlights = "".join( + f"
  • {highlight}
  • " + for highlight in item["highlights"] + ) + return f""" +
    +
    {item['folder_title']}
    +
    {item['title']}
    +
    {item['description']}
    +
      {highlights}
    +
    + 右侧保留可跳转目录 +
    +
    +""" + + +def homepage_nav_html(): + return """ +
    +
    +
    Platform Engineering Home
    +
    平台工程总览入口
    +
    首页只保留全局脉搏、资源域摘要与跳转,详细明细统一下沉到二级 dashboard。
    +
    +
    + IAAS资源 + PaaS服务 + 业务单元 +
    +
    +""" + + +def homepage_guide_html(): + return """ +
    +
    +
    IAAS资源
    +
    计算 / 存储 / 网络
    +
    先看宿主、磁盘、VIP 与底层资源是否健康。
    +
    +
    +
    PaaS服务
    +
    控制面 / 集群 / DB / 缓存
    +
    平台自身与共享服务按资源域稳定分层。
    +
    +
    +
    业务单元
    +
    代理 / 请求
    +
    业务接入面与请求观测单独收口,不再混在底层资源里。
    +
    +
    +""" + + +def select_platform_summary_panels(control_plane): + wanted = ["Pigsty ${version}", "Modules", "Instances", "Firing Alerts"] + by_title = {panel.get("title"): panel for panel in control_plane.get("panels", [])} + return [by_title[title] for title in wanted if title in by_title] + + +def add_domain_section(homepage, start_id, current_y, section): + panel_id = start_id + homepage["panels"].append(make_row_panel(panel_id, section["title"], current_y)) + panel_id += 1 + current_y += 1 + + width = 24 // len(section["items"]) + summary_height = 5 + max_dash_height = max(item["dash_height"] for item in section["items"]) + + for index, item in enumerate(section["items"]): + x = width * index + homepage["panels"].append( + make_text_panel( + panel_id, + f"{item['title']}摘要", + summary_card_html(item), + x, + current_y, + width, + summary_height, + ) + ) + panel_id += 1 + + current_y += summary_height + + for index, item in enumerate(section["items"]): + x = width * index + homepage["panels"].append( + make_dashlist_panel( + panel_id, + f"{item['title']}目录", + [item["tag"]], + x, + current_y, + width, + item["dash_height"], + max_items=20, + ) + ) + panel_id += 1 + + current_y += max_dash_height + return panel_id, current_y + + def merge_dashboards(): - # Paths to source dashboards - pig_path = 'files/grafana/pigsty.json' - node_path = 'files/grafana/node.json' - k8s_path = 'files/grafana/k8s.json' - output_path = 'files/grafana/homepage.json' + with open(CONTROL_PLANE_PATH, "r") as handle: + control_plane = json.load(handle) - # Read raw contents - with open(pig_path, 'r') as f: - pig_raw = f.read() - with open(node_path, 'r') as f: - node_raw = f.read() - with open(k8s_path, 'r') as f: - k8s_raw = f.read() - - # Perform fixed variable mapping for node.json - # $name -> $hostname, $instance -> $node, $show_name -> $show_hostname - node_raw = re.sub(r'\$name\b', '$hostname', node_raw) - node_raw = re.sub(r'\$\{name\}', '${hostname}', node_raw) - node_raw = re.sub(r'\$instance\b', '$node', node_raw) - node_raw = re.sub(r'\$\{instance\}', '${node}', node_raw) - node_raw = re.sub(r'\$show_name\b', '$show_hostname', node_raw) - node_raw = re.sub(r'\$\{show_name\}', '${show_hostname}', node_raw) - - pig = json.loads(pig_raw) - node = json.loads(node_raw) - k8s = json.loads(k8s_raw) - - # Base dashboard homepage = { - "annotations": pig.get("annotations", {"list": []}), - "description": "Pigsty Consolidated Homepage", + "annotations": control_plane.get("annotations", {"list": []}), + "description": "Platform engineering entry dashboard", "editable": True, "graphTooltip": 0, "id": None, - "links": pig.get("links", []), + "links": control_plane.get("links", []), "panels": [], "schemaVersion": 39, - "tags": ["HOME", "Pigsty"], - "templating": {"list": []}, - "time": pig.get("time", {"from": "now-1h", "to": "now"}), - "timepicker": pig.get("timepicker", {}), + "tags": ["HOME", "Platform"], + "templating": {"list": VISIBLE_VARS}, + "time": control_plane.get("time", {"from": "now-1h", "to": "now"}), + "timepicker": control_plane.get("timepicker", {}), "timezone": "browser", "title": "Homepage", "uid": "home", - "version": 1 + "version": 1, } - # Unified Variables - unified_vars = [ - {"name": "version", "type": "constant", "query": "v4.0.0", "hide": 2}, - {"name": "origin_prometheus", "label": "数据源", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(kube_node_info,origin_prometheus)", "refresh": 1}, - {"name": "NameSpace", "label": "命名空间", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(kube_namespace_created{origin_prometheus=~\"$origin_prometheus\"},namespace)"}, - {"name": "Container", "label": "服务", "description": "服务(容器)", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",namespace=~\"$NameSpace\"},container)"}, - {"name": "Pod", "label": "Pod", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(kube_pod_container_info{origin_prometheus=~\"$origin_prometheus\",namespace=~\"$NameSpace\",container=~\"$Container\"},pod)"}, - {"name": "hostname", "label": "主机名", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\"},nodename)"}, - {"name": "node", "label": "实例 IP", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\", nodename=~\"$hostname\"},instance)"}, - {"name": "device", "label": "网卡", "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(node_network_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\", instance=~\"$node\", device!~\"'tap.*|veth.*|br.*|docker.*|virbr.*|lo.*|cni.*'\"},device)"}, - {"name": "interval", "label": "采样间隔", "type": "interval", "query": "3m,5m,10m,30m,1h,6h,12h,1d"}, - {"name": "job", "label": "JOB(高级)", "hide": 2, "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\"},job)"}, - {"name": "Node", "label": "节点池(高级)", "hide": 2, "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(kube_node_info{origin_prometheus=~\"$origin_prometheus\"},node)"}, - {"name": "maxmount", "hide": 2, "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "query_result(topk(1,sort_desc(max(node_filesystem_size_bytes{origin_prometheus=~\"$origin_prometheus\",instance=~\"$node\",fstype=~\"ext.?|xfs\",mountpoint!~\".*pods.*\"}) by (mountpoint))))"}, - {"name": "show_hostname", "hide": 2, "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "label_values(node_uname_info{origin_prometheus=~\"$origin_prometheus\", job=~\"$job\", nodename=~\"$hostname\", instance=~\"$node\"},nodename)"}, - {"name": "total", "hide": 2, "type": "query", "datasource": {"uid": "ds-prometheus"}, "query": "query_result(count(node_uname_info{origin_prometheus=~\"$origin_prometheus\",job=~\"$job\"}))"} - ] - homepage["templating"]["list"] = unified_vars - - nav_html = """ -
    - -
    先选模块,再用顶部筛选器缩小范围。
    -
    -""" - - guide_html = """ -
    -
    -
    范围筛选
    -
    数据源 → 命名空间 → 服务 → Pod
    -
    用于缩小 K8S 资源范围
    -
    -
    -
    当前对象
    -
    主机名 → 实例 IP → 网卡
    -
    用于定位当前分析对象
    -
    -
    -
    视图参数
    -
    采样间隔 + 高级筛选
    -
    JOB 与节点池已折叠为高级项
    -
    -
    -""" - - top_panels = [ - make_text_panel(1, "模块导航", nav_html, 0, 0, 24, 3), - make_text_panel(2, "筛选说明", guide_html, 0, 3, 24, 5), - ] - homepage["panels"].extend(top_panels) + panel_id = 1 + homepage["panels"].append( + make_text_panel(panel_id, "总览导航", homepage_nav_html(), 0, 0, 24, 3) + ) + panel_id += 1 + homepage["panels"].append( + make_text_panel(panel_id, "结构说明", homepage_guide_html(), 0, 3, 24, 5) + ) + panel_id += 1 current_y = 8 - # 1. Infra - homepage["panels"].append({"collapsed": False, "gridPos": {"h": 1, "w": 24, "x": 0, "y": current_y}, "title": "基础设施总览", "type": "row", "panels": []}) + homepage["panels"].append(make_row_panel(panel_id, "平台脉搏", current_y)) + panel_id += 1 current_y += 1 - - infra_max_y = current_y - for p in pig.get("panels", []): - if p.get("type") == "row": continue - - # Replace "Apps" panel with "insight Overview" link - if p.get("title") == "Apps": - p["title"] = "insight Overview" - p["type"] = "text" - p["options"] = { - "content": "
    insight Overview
    ", - "mode": "html" - } - - shift_panel(p, current_y) - homepage["panels"].append(p) - infra_max_y = max(infra_max_y, p["gridPos"]["y"] + p["gridPos"]["h"]) - current_y = infra_max_y - # 2. Node - homepage["panels"].append({"collapsed": False, "gridPos": {"h": 1, "w": 24, "x": 0, "y": current_y}, "title": "主机观测", "type": "row", "panels": []}) - current_y += 1 - node_max_y = current_y - for p in node.get("panels", []): - shift_panel(p, current_y) - homepage["panels"].append(p) - node_max_y = max(node_max_y, p["gridPos"]["y"] + p["gridPos"]["h"]) - current_y = node_max_y + summary_layout = [ + ("Pigsty ${version}", 0, 4, 4, 7), + ("Modules", 4, 4, 4, 7), + ("Instances", 8, 4, 8, 7), + ("Firing Alerts", 16, 4, 8, 7), + ] + summary_panels = {panel.get("title"): panel for panel in select_platform_summary_panels(control_plane)} + for title, x, y, w, h in summary_layout: + if title not in summary_panels: + continue + homepage["panels"].append(clone_panel(summary_panels[title], x, y, w, h)) + panel_id += 1 + current_y += 7 - # 3. K8S - homepage["panels"].append({"collapsed": False, "gridPos": {"h": 1, "w": 24, "x": 0, "y": current_y}, "title": "K8S 集群", "type": "row", "panels": []}) - current_y += 1 - k8s_max_y = current_y - for p in k8s.get("panels", []): - p["gridPos"]["y"] += current_y - homepage["panels"].append(p) - k8s_max_y = max(k8s_max_y, p["gridPos"]["y"] + p["gridPos"]["h"]) - current_y = k8s_max_y + for section in DOMAIN_SECTIONS: + panel_id, current_y = add_domain_section(homepage, panel_id, current_y, section) - for i, p in enumerate(homepage["panels"]): - p["id"] = i + 1 + for index, panel in enumerate(homepage["panels"], 1): + panel["id"] = index + + with open(OUTPUT_PATH, "w") as handle: + json.dump(homepage, handle, indent=2) - with open(output_path, 'w') as f: - json.dump(homepage, f, indent=2) if __name__ == "__main__": merge_dashboards()