inital commit
This commit is contained in:
26
README.md
Normal file
26
README.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# OTEL Collector Dev Stand
|
||||||
|
A simple Docker Compose setup that launches pre-configured and integrated services, allowing fully testing interactions with OpenTelemetry:
|
||||||
|
- OTEL Collector
|
||||||
|
- Jaeger
|
||||||
|
- Prometheus
|
||||||
|
- Grafana
|
||||||
|
|
||||||
|
## OTEL Collector
|
||||||
|
Listens on standard OTLP ports (4317 gRPC, 4318 HTTP) and sends trace data to Jaeger. It also collects metrics and exposes them on port 8889 as a standard Prometheus exporter.
|
||||||
|
|
||||||
|
## Jaeger
|
||||||
|
Accessible on port 16686. Receives traces from the OTEL Collector.
|
||||||
|
|
||||||
|
## Prometheus
|
||||||
|
Accessible on port 9090.
|
||||||
|
Collects metrics from the following targets:
|
||||||
|
- OTEL Collector
|
||||||
|
- Grafana self-monitoring
|
||||||
|
- Prometheus self-monitoring
|
||||||
|
|
||||||
|
## Grafana
|
||||||
|
Accessible on port 3000.
|
||||||
|
Login credentials: `admin/grafana`.
|
||||||
|
The following datasources are connected:
|
||||||
|
- Jaeger
|
||||||
|
- Prometheus
|
||||||
3
TODO.md
Normal file
3
TODO.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# TODO List for OTEL Collector Dev Stand
|
||||||
|
|
||||||
|
- [ ] Add support for log collection and processing within the OTEL Collector setup.
|
||||||
42
compose.yaml
Normal file
42
compose.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
services:
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus
|
||||||
|
container_name: prometheus
|
||||||
|
command:
|
||||||
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
|
ports:
|
||||||
|
- 9090:9090
|
||||||
|
volumes:
|
||||||
|
- ./prometheus:/etc/prometheus
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana
|
||||||
|
container_name: grafana
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
environment:
|
||||||
|
- GF_SECURITY_ADMIN_USER=admin
|
||||||
|
- GF_SECURITY_ADMIN_PASSWORD=grafana
|
||||||
|
volumes:
|
||||||
|
- ./grafana:/etc/grafana/provisioning/datasources
|
||||||
|
|
||||||
|
otel-collector:
|
||||||
|
image: otel/opentelemetry-collector:latest
|
||||||
|
container_name: otel-collector
|
||||||
|
command: ["--config=/etc/otel-collector-config.yaml"]
|
||||||
|
volumes:
|
||||||
|
- ./otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml
|
||||||
|
ports:
|
||||||
|
- "4317:4317" # OTLP gRPC receiver
|
||||||
|
- "8889:8889" # Prometheus exposed port
|
||||||
|
depends_on:
|
||||||
|
- jaeger
|
||||||
|
|
||||||
|
jaeger:
|
||||||
|
image: jaegertracing/all-in-one:latest
|
||||||
|
container_name: jaeger
|
||||||
|
environment:
|
||||||
|
- COLLECTOR_OTLP_ENABLED=true
|
||||||
|
- COLLECTOR_OTLP_GRPC_HOST_PORT=:4317
|
||||||
|
ports:
|
||||||
|
- "16686:16686"
|
||||||
14
grafana/datasource.yml
Normal file
14
grafana/datasource.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
url: http://prometheus:9090
|
||||||
|
isDefault: true
|
||||||
|
access: proxy
|
||||||
|
editable: true
|
||||||
|
- name: Jaeger
|
||||||
|
type: jaeger
|
||||||
|
url: http://jaeger:16686
|
||||||
|
access: proxy
|
||||||
|
editable: true
|
||||||
28
otel/otel-collector-config.yaml
Normal file
28
otel/otel-collector-config.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
receivers:
|
||||||
|
otlp:
|
||||||
|
protocols:
|
||||||
|
grpc:
|
||||||
|
endpoint: 0.0.0.0:4317
|
||||||
|
http:
|
||||||
|
endpoint: 0.0.0.0:4318
|
||||||
|
processors:
|
||||||
|
exporters:
|
||||||
|
otlp:
|
||||||
|
endpoint: "http://jaeger:4317"
|
||||||
|
tls:
|
||||||
|
insecure: true
|
||||||
|
debug:
|
||||||
|
verbosity: detailed
|
||||||
|
prometheus:
|
||||||
|
endpoint: 0.0.0.0:8889
|
||||||
|
service:
|
||||||
|
pipelines:
|
||||||
|
traces:
|
||||||
|
receivers: [otlp]
|
||||||
|
processors: []
|
||||||
|
exporters: [otlp, debug]
|
||||||
|
metrics:
|
||||||
|
receivers: [otlp]
|
||||||
|
processors: []
|
||||||
|
exporters: [prometheus, debug]
|
||||||
|
|
||||||
39
prometheus/prometheus.yml
Normal file
39
prometheus/prometheus.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
evaluation_interval: 15s
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- static_configs:
|
||||||
|
- targets: []
|
||||||
|
scheme: http
|
||||||
|
timeout: 10s
|
||||||
|
api_version: v2
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: prometheus
|
||||||
|
honor_timestamps: true
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
scheme: http
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost:9090
|
||||||
|
- job_name: grafana
|
||||||
|
honor_timestamps: true
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
scheme: http
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- grafana:3000
|
||||||
|
- job_name: otel-collector
|
||||||
|
honor_timestamps: true
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
scheme: http
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- otel-collector:8889
|
||||||
Reference in New Issue
Block a user