From 92ad080025beb90e981b9b4a7269ef321cdbb305 Mon Sep 17 00:00:00 2001 From: wade3hamati Date: Wed, 19 Feb 2025 08:36:51 -0500 Subject: [PATCH] GH-214: [feat] Create configuration for Prometheus, Grafana, and Tempo. --- .../monitor/docker/grafana/datasource.yml | 47 +++++++++++++++++++ .../monitor/docker/prometheus/prometheus.yml | 28 +++++++++++ Microservices/monitor/docker/tempo/tempo.yml | 12 +++++ 3 files changed, 87 insertions(+) create mode 100644 Microservices/monitor/docker/grafana/datasource.yml create mode 100644 Microservices/monitor/docker/prometheus/prometheus.yml create mode 100644 Microservices/monitor/docker/tempo/tempo.yml diff --git a/Microservices/monitor/docker/grafana/datasource.yml b/Microservices/monitor/docker/grafana/datasource.yml new file mode 100644 index 00000000..3b9b4bbe --- /dev/null +++ b/Microservices/monitor/docker/grafana/datasource.yml @@ -0,0 +1,47 @@ +apiVersion: 1 + +datasources: + - name: Prometheus + type: prometheus + access: proxy + url: http://prometheus:9090 + editable: false + jsonData: + httpMethod: POST + exemplarTraceIdDestinations: + - name: trace_id + datasourceUid: tempo + - name: Tempo + type: tempo + access: proxy + orgId: 1 + url: http://tempo:3200 + basicAuth: false + isDefault: true + version: 1 + editable: false + apiVersion: 1 + uid: tempo + jsonData: + httpMethod: GET + tracesToLogs: + datasourceUid: 'loki' + nodeGraph: + enabled: true + - name: Loki + type: loki + uid: loki + access: proxy + orgId: 1 + url: http://loki:3100 + basicAuth: false + isDefault: false + version: 1 + editable: false + apiVersion: 1 + jsonData: + derivedFields: + - datasourceUid: tempo + matcherRegex: \[.+,(.+?), + name: TraceID + url: $${__value.raw} \ No newline at end of file diff --git a/Microservices/monitor/docker/prometheus/prometheus.yml b/Microservices/monitor/docker/prometheus/prometheus.yml new file mode 100644 index 00000000..cf808e55 --- /dev/null +++ b/Microservices/monitor/docker/prometheus/prometheus.yml @@ -0,0 +1,28 @@ +global: + scrape_interval: 15s + +scrape_configs: + - job_name: 'user-service' + metrics_path: '/api/user-service/actuator/prometheus' + static_configs: + - targets: [ 'host.docker.internal:8080' ] + - job_name: 'event-service' + metrics_path: '/api/event-service/actuator/prometheus' + scrape_interval: 5s + static_configs: + - targets: [ 'host.docker.internal:8080' ] + - job_name: 'storage-service' + metrics_path: '/api/storage-service/actuator/prometheus' + scrape_interval: 5s + static_configs: + - targets: [ 'host.docker.internal:8080' ] + - job_name: 'orchestration-service' + metrics_path: '/api/orchestration-service/actuator/prometheus' + scrape_interval: 5s + static_configs: + - targets: [ 'host.docker.internal:8080' ] + - job_name: 'messaging-service' + metrics_path: '/api/messaging-service/actuator/prometheus' + scrape_interval: 5s + static_configs: + - targets: [ 'host.docker.internal:8080' ] \ No newline at end of file diff --git a/Microservices/monitor/docker/tempo/tempo.yml b/Microservices/monitor/docker/tempo/tempo.yml new file mode 100644 index 00000000..27b48191 --- /dev/null +++ b/Microservices/monitor/docker/tempo/tempo.yml @@ -0,0 +1,12 @@ +server: + http_listen_port: 3200 + +distributor: + receivers: + zipkin: + +storage: + trace: + backend: local + local: + path: /tmp/tempo/blocks \ No newline at end of file