# Error with HAProxy Dashboards \[ 7.10.2 \]

**URL:** <https://discuss.elastic.co/t/error-with-haproxy-dashboards-7-10-2/275834>\
**Category:** Beats\
**Tags:** beats-module\
**Created:** [June 14, 2021, 1:02pm UTC](https://discuss.elastic.co/t/error-with-haproxy-dashboards-7-10-2/275834 "2021-06-14T13:02:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigo.gz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo.gz/32/81764_2.png) [@rodrigo.gz](https://discuss.elastic.co/u/rodrigo.gz)\
**Post date:** [June 14, 2021, 1:02pm UTC](https://discuss.elastic.co/t/error-with-haproxy-dashboards-7-10-2/275834/1 "2021-06-14T13:02:33Z")

</div>

Hello!

I am trying to monitor a HAProxy with metricbeat and filebeat. ( 7.10.2 )  
When I do the setup and start the agent , it starts collecting metrics and logs correctly but the dashboards do not show the collected information as expected. They show a pike with the correct data and then immediately stop showing real data.

This happens with most visualizations of the default 7 dashboards ( filebeat - metricbeat ).

I have tried visualizing this data via Lens and apparently they are correct. Nevertheless, I would like to be able to have the default dashboards.

I attach a couple of examples.

![error](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f3cd3740da74c01843dda279aaabc656adb33fb.png)

 ![error-2](https://us1.discourse-cdn.com/elastic/original/3X/7/2/723238190c2643a82e6de5fe11cfba0d38f6c76f.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [June 14, 2021, 2:43pm UTC](https://discuss.elastic.co/t/error-with-haproxy-dashboards-7-10-2/275834/2 "2021-06-14T14:43:43Z")

</div>

Hi @rodrigo.gz 🙂

Please, can you also share your configuration file and the log output your are getting from Metricbeat and Filebeat?

---

<div class="post-metadata">

**Author:** ![rodrigo.gz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo.gz/32/81764_2.png) [@rodrigo.gz](https://discuss.elastic.co/u/rodrigo.gz)\
**Post date:** [June 15, 2021, 9:43am UTC](https://discuss.elastic.co/t/error-with-haproxy-dashboards-7-10-2/275834/3 "2021-06-15T09:43:16Z")

</div>

hello mario!

Thanks for responding so quickly!

This are the 2 metricbeat module haproxy.yml files:

```auto
- module: haproxy
  metricsets:
    #- "info"
    - "stat"
  enabled: true
  period: 10s
  hosts: ["http://10.28.28.195:21000/stats","http://10.28.27.42:21000/stats","http://10.28.26.121:21000/stats","http://10.28.31.217:21000/stats","http://10.28.31.156:21000/stats","http://10.28.31.160:21000/stats","http://10.28.29.145:21000/stats","http://10.28.27.175:21000/stats","http://10.28.31.157:21000/stats","http://10.28.31.161:21000/stats","http://10.28.31.141:21000/stats","http://10.28.27.174:21000/stats","http://10.28.30.163:21000/stats","http://10.28.28.178:21000/stats","http://10.28.28.219:21000/stats","http://10.28.28.228:21000/stats","http://10.28.28.85:21000/stats","http://10.28.24.32:21000/stats","http://10.28.31.213:21000/stats","http://10.28.28.245:21000/stats","http://10.28.28.66:21000/stats","http://10.28.30.66:21000/stats","http://10.28.31.224:21000/stats","http://10.28.27.53:21000/stats","http://10.28.30.145:21000/stats","http://10.28.27.173:21000/stats","http://10.28.28.244:21000/stats","http://10.28.31.233:21000/stats","http://10.28.27.18:21000/stats","http://10.28.26.21:21000/stats","http://10.28.29.148:21000/stats","http://10.28.24.16:21000/stats","http://10.28.30.9:21000/stats","http://10.28.31.206:21000/stats","http://10.28.28.76:21000/stats","http://10.28.28.54:21000/stats","http://10.28.31.155:21000/stats","http://10.28.31.159:21000/stats","http://10.28.27.117:21000/stats","http://10.28.31.158:21000/stats","http://10.28.31.153:21000/stats","http://10.28.28.119:21000/stats","http://10.28.31.149:21000/stats","http://10.28.24.14:21000/stats","http://10.28.31.184:21000/stats","http://10.28.30.105:21000/stats","http://10.28.25.95:21000/stats","http://10.28.31.152:21000/stats","http://10.28.28.24:21000/stats","http://10.28.31.225:21000/stats","http://10.28.31.220:21000/stats","http://10.28.26.133:21000/stats","http://10.28.28.208:21000/stats","http://10.28.26.112:21000/stats","http://10.28.28.207:21000/stats","http://10.28.28.209:21000/stats","http://10.28.26.150:21000/stats","http://10.28.28.241:21000/stats","http://10.28.27.235:21000/stats","http://10.28.29.137:21000/stats","http://10.28.31.174:21000/stats","http://10.28.29.133:21000/stats","http://10.28.31.175:21000/stats","http://10.28.31.176:21000/stats","http://10.28.29.134:21000/stats","http://10.28.24.72:21000/stats","http://10.28.29.135:21000/stats","http://10.28.24.74:21000/stats","http://10.28.31.215:21000/stats","http://10.28.28.252:21000/stats","http://10.28.31.234:21000/stats"]

```

```auto
- module: haproxy
  metricsets:
    #- "info"
    - "stat"
  enabled: true
  period: 10s
  hosts: ["http://10.28.31.213:21000/stats","http://10.28.28.76:21000/stats"]
~

```

And this is the haproxy.yml of the filebeat module:

```auto
# Module: haproxy
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.10/filebeat-module-haproxy.html

- module: haproxy
  # All logs
  log:
    enabled: true

    # Set which input to use between syslog (default) or file.
    var.input: "file"

    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    var.paths: ['/var/log/haproxy/*/*.log']
~
~

```

In the logs, metricbeat does not show ERRORS until after 20 minutes it shows a trace like the following:

```auto
2021-06-15T11:13:10.042+0200 INFO module/wrapper.go:259 Error fetching data for metricset haproxy.stat: failed fetching haproxy stat: error making http request: Get "http://10.28.27.175:21000/stats;csv": dial tcp 10.28.27.175:21000: socket: too many open files
2021-06-15T11:13:10.042+0200 INFO module/wrapper.go:259 Error fetching data for metricset haproxy.stat: failed fetching haproxy stat: error making http request: Get "http://10.28.28.252:21000/stats;csv": dial tcp 10.28.28.252:21000: socket: too many open files
2021-06-15T11:13:10.043+0200 INFO module/wrapper.go:259 Error fetching data for metricset haproxy.stat: failed fetching haproxy stat: error making http request: Get "http://10.28.27.42:21000/stats;csv": dial tcp 10.28.27.42:21000: socket: too many open files

```

With this error I have tried to run metricbeat with a higher ulimit ` sudo sh -c " ulimit -n 65535 && metricbeat -e "`  
and it has stopped throwing that error and only shows INFO logs with success codes but the dashboards still do not appear correctly.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/e/1e499ac77275054090f3fd53d879279978a4db28.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c8b8d3bedfdc834ddf9379f69d704b3c424f273.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 13, 2021, 11:43am UTC](https://discuss.elastic.co/t/error-with-haproxy-dashboards-7-10-2/275834/4 "2021-07-13T11:43:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
