# OneAgent does not see haproxy (socket mode stats)

**URL:** <https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263>\
**Category:** Alerting\
**Tags:** technologies, problems-classic\
**Created:** [April 5, 2019, 1:26pm UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263 "2019-04-05T13:26:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![imoskovko1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imoskovko1/32/3573_2.png) [@imoskovko1](https://community.dynatrace.com/u/imoskovko1)\
**Post date:** [April 5, 2019, 1:26pm UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/1 "2019-04-05T13:26:48Z")

</div>

Hello!

What can be reason for ignoring v1.7.9 haproxy?

 ![20239-a5c10637-0ebd-44bc-9959-2fed80d38b20.jpg](https://global.discourse-cdn.com/dynatrace/original/3X/d/6/d6117e3442fc98f02a90403c43fb5283e51bae7a.jpeg)

We are setting up haproxy socket monitoring mode.

As per [HAProxy extension — Dynatrace Docs](https://www.dynatrace.com/support/help/technology-support/monitoring-support/haproxy/)

- Dynatrace User (dtuser) with read privileges in the HAProxy configuration file - OK

- Dynatrace User (dtuser) with read/write privileges in stats sockets - OK

- Stats socket located in a directory in which Dynatrace User (dtuser) has execute permissions -OK

- No docker. Haproxy is regular Linux process.

We sudo to dtuser and under dtuser agle to get stats from it by command

echo “show stat” | nc -U /var/run/haproxy/process1.sock

What else to check?

Regards,

Igor

---

<div class="post-metadata">

**Author:** ![rodrigo\_alvare1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rodrigo_alvare1/32/1927_2.png) [@rodrigo\_alvare1](https://community.dynatrace.com/u/rodrigo_alvare1)\
**Post date:** [April 5, 2019, 6:55pm UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/2 "2019-04-05T18:55:02Z")

</div>

Hi,

Do you have any info in the haproxy error log? Or in oneagent logs?

What rights does the dtuser has? 600 ? 766?

Regards

---

<div class="post-metadata">

**Author:** ![MAkimov](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MAkimov](https://community.dynatrace.com/u/MAkimov)\
**Post date:** [April 8, 2019, 6:36am UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/3 "2019-04-08T06:36:47Z")

</div>

Hi Igor

Did you activeted HaProxy moniroting in glodably ? (_Monitoring → Monitoring Technologies_)

Was it successful ?

---

<div class="post-metadata">

**Author:** ![imoskovko1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imoskovko1/32/3573_2.png) [@imoskovko1](https://community.dynatrace.com/u/imoskovko1)\
**Post date:** [April 8, 2019, 9:16am UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/4 "2019-04-08T09:16:19Z")

</div>

i see following errors

2019-04-08 08:30:19.591 UTC [e593b896] info [native] 140286073489152(MainThread) - [do] Plugin loop status: time\_taken: 0.0003984123468399048, engines\_info: ['\<PluginEngine, meta\_name:ruxit.python.heartbeat id:0x7f96e444d940\>, ’  
'executions:20 ',  
'\<PluginEngine, meta\_name:ruxit.python.haproxy id:0x7f96dd8c6710\>, ’  
'executions:0 '],  
2019-04-08 08:30:19.591 UTC [e593b896] info [native] 140286073489152(MainThread) - [do] {(‘ruxit.python.haproxy’, 3284738063752905237): (PluginFullStatus(pluginName=ruxit.python.haproxy, pluginVersion=2.010, state=ERROR\_CONFIG, description= **Cannot connect to the stats socket. Please check file permissions.** For more details visit {HAPROXY\_REF\_URL}, monitoredEntityId=0x2d95bbdd9e324215, stacktrace=Traceback (most recent call last):  
File “/opt/dynatrace/oneagent/agent/plugin/plugins/ruxit.python.haproxy/ruxit\_haproxy.py”, line 116, in initializeSockets  
sock.connect(os.path.basename(sockAddr))  
PermissionError: [Errno 13] Permission denied  
During handling of the above exception, another exception occurred:  
Traceback (most recent call last):  
File “/opt/dynatrace/oneagent/agent/plugin/engine/ruxit/plugin\_state\_machine.py”, line 290, in \_execute\_next\_task  
self.\_engine.send(None)  
File “/opt/dynatrace/oneagent/agent/plugin/engine/ruxit/plugin\_state\_machine.py”, line 567, in engine\_generator  
plugin\_instance = plugin\_class(\*\*plugin\_args)  
File “/opt/dynatrace/oneagent/agent/plugin/engine/ruxit/api/base\_plugin.py”, line 34, in \_\_init\_\_  
self.initialize(\*\*kwargs)  
File “/opt/dynatrace/oneagent/agent/plugin/plugins/ruxit.python.haproxy/ruxit\_haproxy.py”, line 143, in initialize  
self.initializeSockets(kwargs)  
File “/opt/dynatrace/oneagent/agent/plugin/plugins/ruxit.python.haproxy/ruxit\_haproxy.py”, line 120, in initializeSockets  
raise ConfigException('Cannot connect to the stats socket. Please check file permissions. ’ + self.\_HELP\_MORE\_INFO)  
ruxit.api.exceptions.ConfigException: Cannot connect to the stats socket. Please check file permissions. For more details visit {HAPROXY\_REF\_URL}  
), 37668231.98864356), (‘ruxit.python.heartbeat’, 9889933379201098158): (PluginFullStatus(pluginName=ruxit.python.heartbeat, pluginVersion=1.784, state=OK, description=, monitoredEntityId=0x89401a025f8f61ae, stacktrace=), 37668231.98865236)}

thinking how to solve it …

---

<div class="post-metadata">

**Author:** ![imoskovko1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imoskovko1/32/3573_2.png) [@imoskovko1](https://community.dynatrace.com/u/imoskovko1)\
**Post date:** [April 8, 2019, 9:46am UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/5 "2019-04-08T09:46:25Z")

</div>

after commenting out admin socket from haproxy config errors turned into

2019-04-08 09:25:00.687 UTC [ab32d855] info [native] 140005921171200(MainThread) - [one\_plugin\_loop\_step] plugin \<PluginEngine, meta\_name:ruxit.python.haproxy id:0x7f55a80fc978\> threw exception **Number of stats sockets and processes differ. There should be one socket for each HAProxy process.** For more details visit {HAPROXY\_REF\_URL}

---

<div class="post-metadata">

**Author:** ![imoskovko1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imoskovko1/32/3573_2.png) [@imoskovko1](https://community.dynatrace.com/u/imoskovko1)\
**Post date:** [April 8, 2019, 10:05am UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/6 "2019-04-08T10:05:49Z")

</div>

Ok after 1) setting correct number of sockets = number of workers 2) and disabling admin socket it started to work

 ![20247-2019-04-08-130004.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/e/2e922fa8c581cfe96b4414e84e14809e6c579cbd.png)

now i wonder what is wrong with admin socket and why it it not ignored then marked by #DYNATRACE.SKIP line

---

<div class="post-metadata">

**Author:** ![imoskovko1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imoskovko1/32/3573_2.png) [@imoskovko1](https://community.dynatrace.com/u/imoskovko1)\
**Post date:** [April 8, 2019, 4:30pm UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/7 "2019-04-08T16:30:21Z")

</div>

Hello

Haproxy help [HAProxy extension — Dynatrace Docs](https://www.dynatrace.com/support/help/technology-support/application-software/other-technologies/haproxy/)

mentions OneAgent **v1.165** in “Skipping admin socket” section.]

But in Managed env i only have **v1.163** OneAgent.

When will v1.165 agent available for Managed environment?

---

<div class="post-metadata">

**Author:** ![MAkimov](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MAkimov](https://community.dynatrace.com/u/MAkimov)\
**Post date:** [April 8, 2019, 6:00pm UTC](https://community.dynatrace.com/t/oneagent-does-not-see-haproxy-socket-mode-stats/20263/8 "2019-04-08T18:00:00Z")

</div>

New version is appear each month.

I think we can expect it in the end of April.

I also wait it 😉 (need Akka Http client support)
