After Jenkins Integration, Test Connection Fails and Empty Dashboard appears

Hi all, we are integrating Jenkins with Grafana. I

  1. Followed these steps to install Alloy on MacOS.
    Install Grafana Alloy on macOS | Grafana Alloy documentation
  2. Followed these steps to integrate Jenkins with Grafana.
    Jenkins integration | Grafana Cloud documentation

On this page, Test Connection fails:

Here is the alloy.config segment we added for Jenkins:
discovery.relabel “jenkins_metrics” {
targets = [{
address = “localhost:8080”,
}]

rule {
target_label = “instance”
replacement = “localhost:8080”
}
}

prometheus.scrape “jenkins_metrics” {
targets = discovery.relabel.jenkins_metrics.output
forward_to = [prometheus.remote_write.metrics_service.receiver]
job_name = “integrations/jenkins”
metrics_path = “/prometheus”
}

  1. Error logs indicate: level=error msg=“failed to listen on 127.0.0.1:12345” service=http err=“listen tcp 127.0.0.1:12345: bind: address already in use”
    ~

Please advise. Thanks.

Hello! The “127.0.0.1:12345: bind: address already in use” error usually means that there is already another Alloy instance running on the same host. Is this intentional? If it’s intentional, you will need to set a unique --server.http.memory-addr cmd argument for every Alloy instance.