Created
July 11, 2023 18:47
-
-
Save geekifier/9d2d7d741dffaf64063ced5afa1c033b to your computer and use it in GitHub Desktop.
grafana-agent config problem
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
prometheus.scrape "default" { | |
targets = [{"__address__" = "localhost:12345"}] | |
forward_to = [prometheus.remote_write.prom.receiver] | |
} | |
prometheus.exporter.unix { } | |
prometheus.remote_write "prom" { } | |
discovery.docker "linux" { | |
host = "unix:///var/run/docker.sock" | |
} | |
loki.source.docker "default" { | |
host = "unix:///var/run/docker.sock" | |
targets = discovery.docker.linux.targets | |
forward_to = [loki.write.grafana_cloud.receiver] | |
//forward_to = [loki.process.docker.receiver] | |
} | |
// this was me trying to fix labels | |
loki.process "docker" { | |
forward_to = [loki.write.grafana_cloud.receiver] | |
stage.labels { | |
values = { | |
app = "__meta_docker_container_name", | |
app2 = "container_name", | |
app3 = "__container_name__", | |
} | |
} | |
} | |
loki.write "grafana_cloud" { | |
external_labels = {instance = "test"} | |
endpoint { | |
url = "https://[email protected]/loki/api/v1/push" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment