From 700f1e0001819cf732645d85c53b9b27009a74ab Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 8 Sep 2022 12:29:44 +0800 Subject: [PATCH] docker --- docker-compose.yaml | 15 ++++++++++++--- docker-compose_cfg/datasource-compose.yaml | 2 +- docker-compose_cfg/grafana.ini | 2 +- docker-compose_cfg/prometheus-compose.yml | 6 +++++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 506f77c34..ad3b8547a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -144,9 +144,11 @@ services: # - ./components/prometheus_data:/prometheus container_name: prometheus ports: - - 10007:9090 + - 9091:9091 depends_on: - open_im_server + command: --web.listen-address=:9091 + network_mode: "host" grafana: image: grafana/grafana @@ -158,7 +160,14 @@ services: # - ./components/grafana_data:/var/lib/grafana container_name: grafana ports: - - 10008:10008 + - 10007:10007 depends_on: - prometheus - network_mode: "host" \ No newline at end of file + network_mode: "host" + + node-exporter: + image: quay.io/prometheus/node-exporter + container_name: node-exporter + restart: always + ports: + - "9100:9100" \ No newline at end of file diff --git a/docker-compose_cfg/datasource-compose.yaml b/docker-compose_cfg/datasource-compose.yaml index 3738b74d8..ef9824eb0 100644 --- a/docker-compose_cfg/datasource-compose.yaml +++ b/docker-compose_cfg/datasource-compose.yaml @@ -6,7 +6,7 @@ datasources: type: prometheus access: proxy orgId: 1 - url: http://127.0.0.1:10007 + url: http://127.0.0.1:9091 basicAuth: false isDefault: true version: 1 diff --git a/docker-compose_cfg/grafana.ini b/docker-compose_cfg/grafana.ini index fd4892050..eeac17d6f 100644 --- a/docker-compose_cfg/grafana.ini +++ b/docker-compose_cfg/grafana.ini @@ -38,7 +38,7 @@ protocol = http http_addr = # The http port to use -http_port = 10008 +http_port = 10007 # The public facing domain name used to access grafana from a browser domain = localhost diff --git a/docker-compose_cfg/prometheus-compose.yml b/docker-compose_cfg/prometheus-compose.yml index c8bd84763..2a6daeb79 100644 --- a/docker-compose_cfg/prometheus-compose.yml +++ b/docker-compose_cfg/prometheus-compose.yml @@ -6,9 +6,13 @@ global: scrape_configs: - job_name: 'prometheus' static_configs: - - targets: ['localhost:10007'] + - targets: ['localhost:9091'] - job_name: 'openIM-server' metrics_path: /cms/prometheus/metrics static_configs: - targets: ['localhost:10006'] + - job_name: 'node' + scrape_interval: 8s + static_configs: + - targets: ['localhost:9100'] \ No newline at end of file