Created
January 4, 2024 16:26
-
-
Save sjparkinson/5c2ac4909d5475cffdc77557ad9a3356 to your computer and use it in GitHub Desktop.
OTel Collector carbon receiver with Prometheus remote write exporter.
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
version: '3.8' | |
services: | |
prometheus: | |
image: prom/prometheus | |
ports: | |
- 9090:9090 | |
volumes: | |
- ./prometheus.yml:/prometheus/prometheus.yml | |
command: | |
- '--web.enable-remote-write-receiver' | |
otel-collector: | |
image: otel/opentelemetry-collector-contrib | |
volumes: | |
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml | |
ports: | |
- 8888:8888 # Prometheus metrics exposed by the Collector | |
- 2003:2003 # carbon receiver |
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
receivers: | |
carbon: | |
endpoint: 0.0.0.0:2003 | |
transport: tcp | |
processors: | |
memory_limiter: | |
check_interval: 1s | |
limit_percentage: 70 | |
spike_limit_percentage: 20 | |
batch: ~ | |
exporters: | |
debug: ~ | |
prometheusremotewrite: | |
endpoint: "http://prometheus:9090/api/v1/write" | |
tls: | |
insecure: true | |
extensions: | |
health_check: ~ | |
zpages: ~ | |
service: | |
extensions: | |
- health_check | |
- zpages | |
pipelines: | |
metrics: | |
receivers: | |
- carbon | |
processors: | |
- memory_limiter | |
- batch | |
exporters: | |
- debug | |
- prometheusremotewrite |
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
global: | |
scrape_interval: 15s # By default, scrape targets every 15 seconds. | |
evaluation_interval: 15s # By default, scrape targets every 15 seconds. | |
scrape_configs: | |
- job_name: "prometheus" | |
static_configs: | |
- targets: ["localhost:9090"] | |
- job_name: "otel-collector" | |
static_configs: | |
- targets: ["otel-collector:8888"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment