gfan8w
1
From prometheusexporter, we can see that:
exporters:
prometheus:
endpoint: "1.2.3.4:1234"
......
Otel-contrib collector can export data in the Prometheus format, which allows it to be scraped by a Prometheus server.
May I know how Alloy can do the same?
Not sure what you mean, Alloy has its own prometheus exporter as well, see prometheus.remote_write | Grafana Alloy documentation
gfan8w
3
prometheusexporter, you can see it act like a HTTP server, listen on a port. can Alloy act like this way? listen on a port?
No. Alloy does have an HTTP server, but the metrics exposed are metrics from Alloy agent itself, not the metrics that it’s collecting.