-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: setup otlp prometheus exporter with correct invocation in node
- Loading branch information
Showing
10 changed files
with
377 additions
and
107 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
78 changes: 78 additions & 0 deletions
78
docker/compose/movement-full-node/docker-compose.telemetry.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
services: | ||
prometheus: | ||
image: prom/prometheus:v2.49.1 | ||
container_name: movement-prometheus | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.path=/prometheus' | ||
- '--web.console.libraries=/usr/share/prometheus/console_libraries' | ||
- '--web.console.templates=/usr/share/prometheus/consoles' | ||
ports: | ||
- "9090:9090" | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
- prometheus_data:/prometheus | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:9090/-/healthy || exit 1 | ||
interval: 5s | ||
timeout: 3s | ||
retries: 3 | ||
|
||
grafana: | ||
image: grafana/grafana:10.2.3 | ||
container_name: movement-grafana | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- ./grafana/provisioning:/etc/grafana/provisioning | ||
- ./grafana/dashboards:/var/lib/grafana/dashboards | ||
environment: | ||
- GF_SECURITY_ADMIN_PASSWORD=admin | ||
- GF_USERS_ALLOW_SIGN_UP=false | ||
depends_on: | ||
- prometheus | ||
|
||
movement-full-node: | ||
environment: | ||
- MOVEMENT_METRICS_ADDR=0.0.0.0:9464 | ||
- MOVEMENT_OTLP=http://otel-collector:4317 | ||
ports: | ||
- "9464:9464" | ||
depends_on: | ||
- prometheus: | ||
condition: service_healthy | ||
- otel-collector: | ||
condition: service_healthy | ||
|
||
movement-celestia-da-light-node: | ||
environment: | ||
- MOVEMENT_METRICS_ADDR=0.0.0.0:9464 | ||
- MOVEMENT_OTLP=http://otel-collector:4317 | ||
ports: | ||
- "9465:9464" | ||
depends_on: | ||
- prometheus: | ||
condition: service_healthy | ||
- otel-collector: | ||
condition: service_healthy | ||
|
||
otel-collector: | ||
image: otel/opentelemetry-collector:0.96.0 | ||
container_name: movement-otel-collector | ||
command: ["--config=/etc/otel-collector-config.yaml"] | ||
volumes: | ||
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml | ||
ports: | ||
- "4317:4317" # OTLP gRPC | ||
- "4318:4318" # OTLP HTTP | ||
- "8888:8888" # Prometheus metrics exposed by the collector | ||
- "8889:8889" # Prometheus exporter metrics | ||
- "13133:13133" # Health check extension | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://localhost:13133 || exit 1 | ||
interval: 5s | ||
timeout: 3s | ||
retries: 3 | ||
|
||
volumes: | ||
prometheus_data: |
37 changes: 37 additions & 0 deletions
37
docker/compose/movement-full-node/otel-collector-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:4318 | ||
|
||
processors: | ||
batch: | ||
timeout: 1s | ||
send_batch_size: 1024 | ||
|
||
exporters: | ||
prometheus: | ||
endpoint: "0.0.0.0:8889" | ||
namespace: "movement" | ||
const_labels: | ||
label1: value1 | ||
logging: | ||
loglevel: debug | ||
|
||
extensions: | ||
health_check: | ||
endpoint: 0.0.0.0:13133 | ||
|
||
service: | ||
extensions: [health_check] | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [logging] | ||
metrics: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [prometheus, logging] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
global: | ||
scrape_interval: 15s | ||
evaluation_interval: 15s | ||
|
||
scrape_configs: | ||
- job_name: 'movement-full-node' | ||
static_configs: | ||
- targets: ['movement-full-node:9464'] | ||
metrics_path: / | ||
scheme: http | ||
|
||
- job_name: 'movement-celestia-da-light-node' | ||
static_configs: | ||
- targets: ['movement-celestia-da-light-node:9464'] | ||
metrics_path: / | ||
scheme: http | ||
|
||
- job_name: 'otel-collector' | ||
static_configs: | ||
- targets: ['otel-collector:8889'] | ||
metrics_path: /metrics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
process-compose/movement-full-node/process-compose.telemetry.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: "3" | ||
|
||
environment: | ||
|
||
processes: | ||
prometheus: | ||
is_daemon: true | ||
command: | | ||
docker run -d --rm --name movement-prometheus \ | ||
-p 9090:9090 \ | ||
-v ${PWD}/docker/compose/movement-full-node/prometheus.yml:/etc/prometheus/prometheus.yml \ | ||
prom/prometheus:v2.49.1 | ||
shutdown: | ||
command: | | ||
docker stop movement-prometheus | ||
readiness_probe: | ||
initial_delay_seconds: 3 | ||
exec: | ||
command: wget --no-verbose --tries=1 --spider http://localhost:9090/-/healthy || exit 1 | ||
|
||
movement-full-node: | ||
depends_on: | ||
prometheus: | ||
condition: process_started | ||
environment: | ||
- MOVEMENT_METRICS_ADDR=0.0.0.0:9464 | ||
|
||
movement-celestia-da-light-node: | ||
depends_on: | ||
prometheus: | ||
condition: process_started | ||
environment: | ||
- MOVEMENT_METRICS_ADDR=0.0.0.0:9465 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.