05 Apr 2019 02:26 PM - last edited on 01 Sep 2022 10:43 AM by MaciejNeumann
Hello!
What can be reason for ignoring v1.7.9 haproxy?
We are setting up haproxy socket monitoring mode.
As per 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
Solved! Go to Solution.
05 Apr 2019 07:55 PM
Hi,
Do you have any info in the haproxy error log? Or in oneagent logs?
What rights does the dtuser has? 600 ? 766?
Regards
08 Apr 2019 07:36 AM
Hi Igor
Did you activeted HaProxy moniroting in glodably ? (Monitoring -> Monitoring Technologies)
Was it successful ?
08 Apr 2019 10:16 AM
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 ....
08 Apr 2019 10:46 AM
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}
08 Apr 2019 11:05 AM
Ok after 1) setting correct number of sockets = number of workers 2) and disabling admin socket it started to work
now i wonder what is wrong with admin socket and why it it not ignored then marked by #DYNATRACE.SKIP line
08 Apr 2019 05:30 PM
Hello
Haproxy help https://www.dynatrace.com/support/help/technology-support/application-software/other-technologies/ha...
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?
08 Apr 2019 07:00 PM
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)