diff --git a/config/config.yaml b/config/config.yaml index 55a96f0b8..e51f3e3f9 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -757,3 +757,4 @@ demo: rtc: signalTimeout: 35 + diff --git a/docker-compose.yaml b/docker-compose.yaml index 115c49f9e..4f0c5bd65 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -112,18 +112,7 @@ services: MINIO_ROOT_PASSWORD: key12345 restart: always command: minio server /data --console-address ':9090' - # - # dtm: - # image: yedf/dtm - # ports: - # - 36789:36789 - # - 36790:36790 - # environment: - # STORE_DRIVER: mysql - # STORE_HOST: localhost - # STORE_USER: root - # STORE_PASSWORD: '' - # STORE_PORT: 3306 + open_im_server: image: openim/open_im_server:v2.3.1 @@ -147,3 +136,33 @@ services: options: max-size: "1g" max-file: "2" + + prometheus: + image: prom/prometheus + volumes: + - ./docker-compose_cfg/prometheus-compose.yml:/etc/prometheus/prometheus.yml + container_name: prometheus + networks: + webnet: + aliases: + - "prometheus" + ports: + - "10007:9090" + depends_on: + - open_im_server + + grafana: + image: grafana/grafana + volumes: + - ./grafana/dashboards/dashboard.json:/var/lib/grafana/dashboards/dashboard.json + - ./grafana/provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml + - ./docker-compose_cfg/datasource-compose.yaml:/etc/grafana/provisioning/datasources/datasource.yaml + container_name: grafana + networks: + webnet: + aliases: + - "grafana" + ports: + - "10008:3000" + depends_on: + - prometheus \ No newline at end of file diff --git a/docker-compose_cfg/datasource-compose.yaml b/docker-compose_cfg/datasource-compose.yaml new file mode 100644 index 000000000..3738b74d8 --- /dev/null +++ b/docker-compose_cfg/datasource-compose.yaml @@ -0,0 +1,13 @@ +#more datasource-compose.yaml +apiVersion: 1 + +datasources: +- name: Prometheus + type: prometheus + access: proxy + orgId: 1 + url: http://127.0.0.1:10007 + basicAuth: false + isDefault: true + version: 1 + editable: true \ No newline at end of file diff --git a/docker-compose_cfg/prometheus-compose.yml b/docker-compose_cfg/prometheus-compose.yml new file mode 100644 index 000000000..d61add2fb --- /dev/null +++ b/docker-compose_cfg/prometheus-compose.yml @@ -0,0 +1,13 @@ +#more prometheus-compose.yml +global: + scrape_interval: 15s + evaluation_interval: 15s + +scrape_configs: + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:10007'] + - job_name: 'openIM-server' + static_configs: + - targets: ['localhost:10006/cms/prometheus/'] + \ No newline at end of file