Path: blob/main/docs/sources/flow/tutorials/assets/flow_configs/agent.river
5340 views
// Create a prometheus.scrape component labeled "default."
prometheus.scrape "default" {
// Collect metrics from `http://localhost:12345/metrics`.
// The http:// protocol and /metrics path are implied by default
// but can be overridden.
targets = [{"__address__" = "localhost:12345"}]
// Forward collected metrics to the receiver. forward_to
// is a common argument name used for forwarding Prometheus metrics.
// Receiver is an exported field of prometheus.remote_write.prom which
// can accept metrics.
forward_to = [prometheus.remote_write.prom.receiver]
}
prometheus.remote_write "prom" {
endpoint {
url = "http://mimir:9009/api/v1/push"
}
}