Skip to content

Instantly share code, notes, and snippets.

@ilyam8
Created June 2, 2025 10:17
Show Gist options
  • Select an option

  • Save ilyam8/b64af0b3c792d546bda406b2c96576c8 to your computer and use it in GitHub Desktop.

Select an option

Save ilyam8/b64af0b3c792d546bda406b2c96576c8 to your computer and use it in GitHub Desktop.
otel-coll-simple-config-sample
receivers:
hostmetrics/system:
collection_interval: 10s
scrapers:
# cpu:
# disk:
# filesystem:
# load:
# memory:
network:
# paging:
# processes:
# process:
exporters:
# File exporter writing to stdout with JSON format
file/stdout:
path: /dev/stdout
format: json
# Regular file exporter
file:
path: ./metrics.json
append: false
rotation:
max_megabytes: 10
max_days: 3
max_backups: 3
format: json
# Prometheus exporter
prometheus:
endpoint: "0.0.0.0:8889"
debug:
verbosity: detailed
sampling_initial: 5
sampling_thereafter: 200
service:
pipelines:
metrics:
receivers: [hostmetrics/system]
# exporters: [file/stdout, file, prometheus, debug]
exporters: [file/stdout, file, prometheus]
telemetry:
logs:
level: info
metrics:
level: detailed
address: 0.0.0.0:8888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment