prometheus and otlp
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
[Container]
|
||||
Image=ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.128.0
|
||||
Exec=--config=/etc/otelcol-config.yml
|
||||
Volume=./otelcol-config.yml:/etc/otelcol-config.yml
|
||||
Network=monitoring.network
|
||||
HostName=otel_collector
|
||||
PublishPort=4317:4317
|
||||
PublishPort=54525:54525
|
||||
@@ -0,0 +1,52 @@
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
tcplog:
|
||||
listen_address: "0.0.0.0:54525"
|
||||
|
||||
hostmetrics:
|
||||
scrapers:
|
||||
cpu:
|
||||
metrics:
|
||||
system.cpu.utilization:
|
||||
enabled: true
|
||||
load:
|
||||
memory:
|
||||
metrics:
|
||||
system.memory.utilization:
|
||||
enabled: true
|
||||
|
||||
processors:
|
||||
memory_limiter:
|
||||
check_interval: 1s
|
||||
limit_mib: 2000
|
||||
spike_limit_mib: 500
|
||||
batch:
|
||||
send_batch_size: 1000
|
||||
timeout: 0s
|
||||
send_batch_max_size: 1000
|
||||
|
||||
exporters:
|
||||
debug:
|
||||
otlphttp/prometheus:
|
||||
endpoint: "http://prometheus:9090/api/v1/otlp"
|
||||
tls:
|
||||
insecure: true
|
||||
otlphttp/loki:
|
||||
endpoint: "http://loki:3100/otlp"
|
||||
tls:
|
||||
insecure: true
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
# receivers: [hostmetrics, docker_stats, httpcheck/frontend-proxy, otlp, redis, spanmetrics]
|
||||
receivers: [otlp, hostmetrics]
|
||||
processors: [memory_limiter, batch]
|
||||
exporters: [otlphttp/prometheus, debug]
|
||||
logs:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch]
|
||||
exporters: [otlphttp/loki, debug]
|
||||
@@ -0,0 +1,20 @@
|
||||
# scrape_configs:
|
||||
# # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
||||
# - job_name: "otel_collector"
|
||||
# static_configs:
|
||||
# - targets: ["otel_collector:6327"]
|
||||
|
||||
storage:
|
||||
tsdb:
|
||||
out_of_order_time_window: 30m
|
||||
|
||||
otlp:
|
||||
# Recommended attributes to be promoted to labels.
|
||||
promote_resource_attributes:
|
||||
- service.instance.id
|
||||
- service.name
|
||||
- service.namespace
|
||||
- service.version
|
||||
- container.name
|
||||
- deployment.environment
|
||||
- deployment.environment.name
|
||||
@@ -0,0 +1,11 @@
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
[Container]
|
||||
Image=quay.io/prometheus/prometheus:latest
|
||||
PublishPort=9090:9090
|
||||
Volume=prometheus-data.volume:/prometheus
|
||||
Volume=./prometheus-config.yml:/etc/prometheus/prometheus.yml:ro
|
||||
Network=monitoring.network
|
||||
HostName=prometheus
|
||||
Exec=--config.file=/etc/prometheus/prometheus.yml --web.enable-otlp-receiver
|
||||
Reference in New Issue
Block a user