Skip to content

Commit

Permalink
fix(docs): use service_name labels in grafana-agent example (#1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
korniltsev authored Jul 14, 2023
1 parent ce96601 commit daa32a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions examples/grafana-agent/agent/config/config.river
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
logging {
level = "debug"
format = "logfmt"
}

pyroscope.write "example" {
// Send metrics to a locally running Phlare instance.
endpoint {
Expand All @@ -17,8 +22,8 @@ pyroscope.write "example" {

pyroscope.scrape "default" {
targets = [
{"__address__" = "pyroscope:4100", "app"="pyroscope"},
{"__address__" = "agent:12345", "app"="agent"},
{"__address__" = "pyroscope:4100", "service_name"="pyroscope"},
{"__address__" = "agent:12345", "service_name"="agent"},
]
forward_to = [pyroscope.write.example.receiver]
}
3 changes: 2 additions & 1 deletion examples/grafana-agent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- 3000:3000

pyroscope:
image: 'grafana/phlare:latest'
image: 'grafana/phlare:weekly-f22-06e09923'
ports:
- 4100:4100
command: -config.file=/etc/pyroscope/config.yaml
Expand All @@ -24,6 +24,7 @@ services:
command:
- run
- /etc/agent-config/config.river
- --server.http.listen-addr=0.0.0.0:12345
environment:
HOSTNAME: agent
AGENT_MODE: flow
Expand Down

0 comments on commit daa32a5

Please sign in to comment.