From 1d0c329f6e29873e551bcd21c18132af8177af4e Mon Sep 17 00:00:00 2001 From: BBIT-Kai <2911862937@qq.com> Date: Tue, 14 Oct 2025 17:52:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Prometheus=E4=B8=8EGrafana?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docker/config/prometheus/prometheus.yml | 47 +++++++++++++++++++ .../web-antd/src/router/routes/modules/set.ts | 28 ++++++++--- 2 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 server/docker/config/prometheus/prometheus.yml diff --git a/server/docker/config/prometheus/prometheus.yml b/server/docker/config/prometheus/prometheus.yml new file mode 100644 index 0000000..00ae626 --- /dev/null +++ b/server/docker/config/prometheus/prometheus.yml @@ -0,0 +1,47 @@ +global: + scrape_interval: 15s + evaluation_interval: 15s + scrape_timeout: 10s + +scrape_configs: + + - job_name: 'prometheus' + static_configs: + - targets: ['ce_prometheus:9090'] + + - job_name: 'kong' + metrics_path: /metrics + static_configs: + - targets: ['ce_kong:8001'] + + - job_name: 'postgres' + static_configs: + - targets: ['ce_postgres_exporter:9187'] + + - job_name: 'rabbitmq' + static_configs: + - targets: ['ce_rabbitmq:15692'] + + - job_name: 'milvus' + metrics_path: /metrics + static_configs: + - targets: ['ce_milvus:9091'] + + - job_name: 'redis' + static_configs: + - targets: + - ce_redis_exporter:9121 + + - job_name: 'node_exporter' + static_configs: + - targets: ['10.10.10.9:9100'] + + - job_name: 'minio' + metrics_path: /minio/v2/metrics/cluster + static_configs: + - targets: ['10.10.10.9:9000'] + + - job_name: 'docker' + static_configs: + - targets: ['10.10.10.9:9323'] + diff --git a/vue/apps/web-antd/src/router/routes/modules/set.ts b/vue/apps/web-antd/src/router/routes/modules/set.ts index ba30603..af3590f 100644 --- a/vue/apps/web-antd/src/router/routes/modules/set.ts +++ b/vue/apps/web-antd/src/router/routes/modules/set.ts @@ -6,7 +6,7 @@ import { $t } from '#/locales'; const routes: RouteRecordRaw[] = [ { meta: { - icon: 'ic:round-handyman', + icon: 'mdi:monitor-dashboard', keepAlive: false, authority: ['set'], order: 2, @@ -22,7 +22,6 @@ const routes: RouteRecordRaw[] = [ meta: { icon: 'mdi:monitor-dashboard', link: 'http://10.10.10.9:8002/', - keepAlive: true, title: 'Kong后台', }, }, @@ -33,7 +32,6 @@ const routes: RouteRecordRaw[] = [ meta: { icon: 'mdi:monitor-dashboard', link: 'http://10.10.10.9:9001', - keepAlive: true, title: 'MinIO后台', }, }, @@ -44,7 +42,6 @@ const routes: RouteRecordRaw[] = [ meta: { icon: 'mdi:monitor-dashboard', link: 'http://10.10.10.9:9091/webui', - keepAlive: true, title: 'Milvus后台', }, }, @@ -55,7 +52,6 @@ const routes: RouteRecordRaw[] = [ meta: { icon: 'mdi:monitor-dashboard', link: 'http://10.10.10.9:3000/', - keepAlive: true, title: 'Milvus Attu后台', }, }, @@ -66,7 +62,6 @@ const routes: RouteRecordRaw[] = [ meta: { icon: 'mdi:monitor-dashboard', link: 'http://10.10.10.9:15672', - keepAlive: true, title: 'RabbitMQ后台', }, }, @@ -77,10 +72,29 @@ const routes: RouteRecordRaw[] = [ meta: { icon: 'mdi:monitor-dashboard', link: 'http://10.10.10.9:13011', - keepAlive: true, title: 'Harbor后台', }, }, + { + name: 'Prometheus-webui', + path: '/set/Prometheus', + component: IFrameView, + meta: { + icon: 'mdi:monitor-dashboard', + link: 'http://10.10.10.9:9090', + title: 'Prometheus后台', + }, + }, + { + name: 'Grafana-webui', + path: '/set/Grafana', + component: IFrameView, + meta: { + icon: 'mdi:monitor-dashboard', + link: 'http://10.10.10.9:3001', + title: 'Grafana后台', + }, + }, ], }, ];