Configure the HAProxy integration
Now that HAProxy is exposing metrics on port 8404, copy the Alloy snippet from the HAProxy integration page and add it to the Alloy configuration file.
Return to the HAProxy integration page in Grafana Cloud to complete the configuration.
If you navigated away, return to the HAProxy integration page:
a. Click Connections > Add new connection in the left-side menu
b. Search for
HAProxyand click the tilec. Click Proceed to install integration if you completed the Alloy installation step
Scroll to the Set up Grafana Alloy to use the HAProxy integration section.
At the bottom of the snippet, click Copy to clipboard.
On the HAProxy server, open the Alloy configuration file:
sudo nano /etc/alloy/config.alloyPaste the snippet at the end of the file. It scrapes
localhost:8404, which matches the stats frontend you added when you configured HAProxy.If HAProxy and Alloy are on different machines, change
__address__fromlocalhost:8404to the HAProxy host and port.Save the file, then restart Alloy:
sudo systemctl restart alloy.serviceIn Grafana Cloud, click Test connection. A successful test shows that Alloy is collecting HAProxy metrics and sending them to Grafana Cloud.
The integration is now configured. Alloy begins collecting HAProxy frontend and backend metrics and forwarding them to your Grafana Cloud stack.