Created
April 18, 2023 16:23
-
-
Save cyrille-leclerc/c47e0b219f581f52c2eed8f9e6df6ce8 to your computer and use it in GitHub Desktop.
Grafana Agent Flow OTLP config template
This file contains hidden or 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
otelcol.receiver.otlp "default" { | |
grpc { | |
endpoint = "0.0.0.0:4317" | |
} | |
output { | |
metrics = [otelcol.processor.batch.default.input] | |
logs = [otelcol.processor.batch.default.input] | |
traces = [otelcol.processor.batch.default.input] | |
} | |
} | |
otelcol.processor.batch "default" { | |
output { | |
metrics = [otelcol.processor.memory_limiter.default.input] | |
logs = [otelcol.processor.memory_limiter.default.input] | |
traces = [otelcol.processor.memory_limiter.default.input] | |
} | |
} | |
otelcol.processor.memory_limiter "default" { | |
check_interval = "1s" | |
limit = "150MiB" | |
output { | |
metrics = [otelcol.exporter.prometheus.default.input] | |
logs = [otelcol.exporter.loki.default.input] | |
traces = [otelcol.exporter.otlp.grafana_cloud_tempo.input] | |
} | |
} | |
otelcol.exporter.loki "default" { | |
forward_to = [loki.write.default.receiver] | |
} | |
otelcol.exporter.prometheus "default" { | |
forward_to = [prometheus.remote_write.default.receiver] | |
} | |
prometheus.remote_write "default" { | |
endpoint { | |
url = <<PROMETHEUS_URL>> | |
basic_auth { | |
username = <<PROMETHEUS_USERNAME>> | |
password = <<PROMETHEUS_PASSWORD>> | |
} | |
} | |
} | |
loki.write "default" { | |
endpoint { | |
url = <<LOKI_URL>> | |
basic_auth { | |
username = <<LOKI_USERNAME>> | |
password = <<LOKI_PASSWORD>> | |
} | |
} | |
} | |
otelcol.exporter.otlp "grafana_cloud_tempo" { | |
client { | |
endpoint = <<TEMPO_ENDPOINT>> | |
auth = otelcol.auth.basic.grafana_cloud_tempo.handler | |
} | |
} | |
otelcol.auth.basic "grafana_cloud_tempo" { | |
username = <<TEMPO_USERNAME>> | |
password = <<TEMPO_PASSWORD>> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment