Skip to content

Instantly share code, notes, and snippets.

@pingkunga
Created December 11, 2023 08:51
Show Gist options
  • Save pingkunga/a3609b498055f8d2bd7f52c7619729fd to your computer and use it in GitHub Desktop.
Save pingkunga/a3609b498055f8d2bd7f52c7619729fd to your computer and use it in GitHub Desktop.
GrafanaAgent
logging {
level = "debug"
format = "logfmt"
}
otelcol.receiver.otlp "example" {
http {
endpoint = "0.0.0.0:4318"
}
output {
//metrics = [otelcol.processor.batch.default.input]
metrics = [otelcol.exporter.prometheus.default.input]
//logs = [otelcol.processor.batch.default.input]
logs = [otelcol.exporter.loki.default.input]
//traces = [otelcol.processor.batch.default.input]
traces = [otelcol.exporter.otlphttp.tempo.input]
}
}
otelcol.processor.batch "default" {
output {
metrics = [otelcol.exporter.logging.default.input]
logs = [otelcol.exporter.logging.default.input]
traces = [otelcol.exporter.logging.default.input]
}
}
otelcol.exporter.logging "default" {
verbosity = "detailed"
sampling_initial = 1
sampling_thereafter = 1
}
otelcol.exporter.loki "default" {
forward_to = [loki.write.local.receiver]
}
loki.write "local" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}
otelcol.exporter.prometheus "default" {
forward_to = [prometheus.remote_write.mimir.receiver]
}
prometheus.remote_write "mimir" {
endpoint {
url = "http://mimir:9009/api/v1/push"
}
}
//otelcol.exporter.otlp > gRPC
//otelcol.exporter.otlphttp > HTTP
otelcol.exporter.otlphttp "tempo" {
client {
endpoint = "http://tempo:4318"
tls {
insecure = true
insecure_skip_verify = true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment