diff --git a/README.md b/README.md index a9e92b7..6b881f3 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,15 @@ chassis 微服务基座依赖的服务 + ## 已整合 - Metrics - Statsd - Statsd-exporter +- Metrics Server + - Prometheus + - Grafana - Logging - Elasticsearch - Logstash @@ -19,6 +23,7 @@ chassis 微服务基座依赖的服务 - Mysql - …… + ## 启动 Metrics 相关服务 根据实际的nameko微服务去配置 statsd_mapping.yml @@ -30,6 +35,20 @@ grafana 的配置在:./service_configs/admin_service/grafana/xxxx.json (根 `docker-compose -f docker-compose-metrics.yml up -d --build` +## 启动 Metrics Server 相关服务 + +启动服务的命令: + +`docker-compose -f docker-compose-metrics-server.yml up -d --build` + + +## 启动 Tracing 相关服务 + +启动服务的命令: + +`docker-compose -f docker-compose-tracing.yml up -d --build` + + ## 启动 Logging 相关服务 启动服务的命令: @@ -39,7 +58,6 @@ grafana 的配置在:./service_configs/admin_service/grafana/xxxx.json (根 ## 启动 APISIX - 启动服务的命令: `docker-compose -f docker-compose-apisix.yml up -d --build` @@ -47,7 +65,6 @@ grafana 的配置在:./service_configs/admin_service/grafana/xxxx.json (根 ## 启动 RabbitMQ - 启动服务的命令: `docker-compose -f docker-compose-rabbitmq.yml up -d --build` @@ -55,20 +72,20 @@ grafana 的配置在:./service_configs/admin_service/grafana/xxxx.json (根 ## 启动 Mysql - 启动服务的命令: `docker-compose -f docker-compose-mysql.yml up -d --build` - ## TODO -- Metrics - - Prometheus - - rabbitmq_exporter - - Grafana +- Tracing + - Skywalking - Error Reporting - Sentry +- Prometheus Exporter + - rabbitmq_exporter + - node_exporter + - nginx_exporter - 事务服务 - DTM \ No newline at end of file diff --git a/docker-compose-metrics-server.yml b/docker-compose-metrics-server.yml new file mode 100644 index 0000000..43d2a61 --- /dev/null +++ b/docker-compose-metrics-server.yml @@ -0,0 +1,34 @@ +version: "3" + +services: + + prometheus: + image: prom/prometheus:latest + container_name: 'prometheus' + hostname: 'prometheus' + restart: always + volumes: + - ./metrics_server/prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml + ports: + - "9193:9090" + networks: + chassis_agent_metrics_server: + + grafana: + image: grafana/grafana:latest + container_name: 'grafana' + hostname: 'grafana' + restart: always + ports: + - "3100:3000" + volumes: + - ./metrics_server/grafana_conf/provisioning:/etc/grafana/provisioning + # - ./metrics/grafana_conf/dashboards:/var/lib/grafana/dashboards + - ./metrics_server/grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini + networks: + chassis_agent_metrics_server: + + +networks: + chassis_agent_metrics_server: + driver: bridge \ No newline at end of file diff --git a/docker-compose-metrics.yml b/docker-compose-metrics.yml index d289b6e..db83826 100644 --- a/docker-compose-metrics.yml +++ b/docker-compose-metrics.yml @@ -28,32 +28,6 @@ services: networks: chassis_agent_metrics: - statsd-prometheus: - image: prom/prometheus:latest - container_name: 'statsd-prometheus' - hostname: 'statsd-prometheus' - restart: always - volumes: - - ./metrics/prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml - ports: - - "9193:9090" - networks: - chassis_agent_metrics: - - statsd-grafana: - image: grafana/grafana:latest - container_name: 'statsd-grafana' - hostname: 'statsd-grafana' - restart: always - ports: - - "3100:3000" - volumes: - - ./metrics/grafana_conf/provisioning:/etc/grafana/provisioning - # - ./metrics/grafana_conf/dashboards:/var/lib/grafana/dashboards - - ./metrics/grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini - networks: - chassis_agent_metrics: - networks: chassis_agent_metrics: driver: bridge diff --git a/docker-compose-tracing.yml b/docker-compose-tracing.yml new file mode 100644 index 0000000..e69de29 diff --git a/metrics/grafana_conf/config/grafana.ini b/metrics_server/grafana_conf/config/grafana.ini similarity index 100% rename from metrics/grafana_conf/config/grafana.ini rename to metrics_server/grafana_conf/config/grafana.ini diff --git a/metrics/grafana_conf/provisioning/dashboards/all.yaml b/metrics_server/grafana_conf/provisioning/dashboards/all.yaml similarity index 100% rename from metrics/grafana_conf/provisioning/dashboards/all.yaml rename to metrics_server/grafana_conf/provisioning/dashboards/all.yaml diff --git a/metrics/grafana_conf/provisioning/datasources/all.yaml b/metrics_server/grafana_conf/provisioning/datasources/all.yaml similarity index 100% rename from metrics/grafana_conf/provisioning/datasources/all.yaml rename to metrics_server/grafana_conf/provisioning/datasources/all.yaml diff --git a/metrics/prometheus_conf/prometheus.yml b/metrics_server/prometheus_conf/prometheus.yml similarity index 100% rename from metrics/prometheus_conf/prometheus.yml rename to metrics_server/prometheus_conf/prometheus.yml