# Haproxy go.d configuration for stats page

**URL:** <https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916>\
**Category:** Help\
**Tags:** configuration, agent, collectors\
**Created:** [March 2, 2023, 12:41pm UTC](https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916 "2023-03-02T12:41:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CZAirwolf](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/czairwolf/32/2649_2.png) [@CZAirwolf](https://community.netdata.cloud/u/CZAirwolf)\
**Post date:** [March 2, 2023, 12:41pm UTC](https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916/1 "2023-03-02T12:41:29Z")

</div>

## Problem/Question

We are moving from python.d collectors and have problem with go.d version. Our configuration is:  
haproxy.cfg:

```auto
listen stats 
 bind :::1936
 stats enable
 stats uri /

```

python.d/haproxy.conf

```auto
socket: '/var/run/haproxy/admin.sock'

```

Now how to configure haproxy go.d collector?  
go.d/haproxy.conf:

```auto
jobs:
 - name: local
   url: http://[::1]:1936/;csv

```

```auto
[DEBUG] build[manager] build.go:154 received config group ('/etc/netdata/go.d/haproxy.conf'): 1 jobs (added: 1, removed: 0)
[DEBUG] build[manager] build.go:303 building haproxy[local] job, config: map[__provider__ :file reader __source__ :/etc/netdata/go.d/haproxy.conf autodetection_retry:0 module:haproxy name:local priority:70000 update_every:1 url:http://127.0.0.1:1936/;csv]
[ERROR] haproxy[local] haproxy.go:80 unsupported character in float
[ERROR] haproxy[local] job.go:191 check failed

```

go.d/haproxy.conf:

```auto
jobs:
 - name: local
   url: http://127.0.0.1:1936/

```

```auto
[DEBUG] build[manager] build.go:154 received config group ('/etc/netdata/go.d/haproxy.conf'): 1 jobs (added: 1, removed: 0)
[DEBUG] build[manager] build.go:303 building haproxy[local] job, config: map[__provider__ :file reader __source__ :/etc/netdata/go.d/haproxy.conf autodetection_retry:0 module:haproxy name:local priority:70000 update_every:1 url:http://127.0.0.1:1936/]
[ERROR] haproxy[local] haproxy.go:80 "INVALID" is not a valid start token
[ERROR] haproxy[local] job.go:191 check failed

```

Even using ’ or " doesn’t work.

## Relevant docs you followed/actions you took to solve the issue

> **[HAProxy | Learn Netdata](https://learn.netdata.cloud/docs/collecting-metrics/web-servers-and-web-proxies/haproxy)**
>
> Plugin: go.d.plugin

## Environment/Browser/Agent’s version etc

agent 1.38.1

## What I expected to happen

Data from stats page. Curl under netdata user returns stats data.

---

<div class="post-metadata">

**Author:** ![Christopher\_Akritid1](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/christopher_akritid1/32/419_2.png) [@Christopher\_Akritid1](https://community.netdata.cloud/u/Christopher_Akritid1)\
**Post date:** [March 2, 2023, 2:46pm UTC](https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916/2 "2023-03-02T14:46:57Z")

</div>

From the [documentation](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/haproxy) it looks like the PROMEX module is required. That module exposes the metrics in the Prometheus format, accessible by default at `http://xxx:8404/metrics`, based on what I see in the config file.

I’m personally not sure what’s on port 1936 or what the `;csv` is supposed to mean, perhaps this is a legacy way of exporting metrics that the old collector used.

---

<div class="post-metadata">

**Author:** ![CZAirwolf](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/czairwolf/32/2649_2.png) [@CZAirwolf](https://community.netdata.cloud/u/CZAirwolf)\
**Post date:** [March 2, 2023, 3:41pm UTC](https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916/3 "2023-03-02T15:41:15Z")

</div>

Thank you, i missed this part. Anyway, i must revert to python.d module because netdata go.d module supports backends stats only.

---

<div class="post-metadata">

**Author:** ![Christopher\_Akritid1](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/christopher_akritid1/32/419_2.png) [@Christopher\_Akritid1](https://community.netdata.cloud/u/Christopher_Akritid1)\
**Post date:** [March 2, 2023, 4:49pm UTC](https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916/4 "2023-03-02T16:49:52Z")

</div>

We need to extend it to support the other metrics too then. @ilyam8 ?

---

<div class="post-metadata">

**Author:** ![Cedric\_Counotte](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/cedric_counotte/32/1621_2.png) [@Cedric\_Counotte](https://community.netdata.cloud/u/Cedric_Counotte)\
**Post date:** [August 12, 2024, 9:23am UTC](https://community.netdata.cloud/t/haproxy-go-d-configuration-for-stats-page/3916/5 "2024-08-12T09:23:50Z")

</div>

We used to monitor our haproxy installation with netdata, but recently found out it doesn’t work anymore.

We keep getting this error, no matter what:

ERR haproxy/haproxy.go:85 failed to parse prometheus metrics: expected a valid start token, got “\<” (“INVALID”) while parsing: “\<” collector=haproxy job=local

As I remember it, it used to work through sockets (/run/haproxy/admin.sock), but it doesn’t seem to work like that anymore?
