emqx-prometheus icon indicating copy to clipboard operation
emqx-prometheus copied to clipboard

StatsD Support Not as Stated

Open louisburton opened this issue 4 years ago • 1 comments

In the latest release, v4.1.2, and lower releases - this plugin is named emqx_statsd and documentation suggests it supports pushing to a statsd endpoint. In fact, I see the repository renaming was only recent and as yet unreleased. https://docs.emqx.io/broker/latest/en/advanced/metrics-and-stats.html

However, upon trying to configure this to push to a GoStatsD endpoint (port 8125/udp) that I use to bridge to NewRelic, I can't get the integration to work. Upon digging, it looks like the code is very specifically tied to the prometheus pushgateway metric endpoint format, and looks like it tries to push via HTTP to endpoints like http://pushgateway.example.org:9091/metrics/job/some_job. I can expose HTTP ingestion endpoints, but not at paths like /metrics/job/some_job which I believe are dynamic to the node name?

https://github.com/emqx/emqx-prometheus/blob/v4.1.2/src/emqx_statsd.erl#L85-L87

Is pushing to statsd supported? I noticed the dependent library seem to allow pushing via UDP to a statsd endpoint, but is this used in this fashion? https://github.com/lpgauth/statsderl

Would love to get statsd metrics into my non-prometheus system 🙏

louisburton avatar Jul 28 '20 16:07 louisburton

@louisburton For some historical reasons, the emqx-statsd plugin (renamed emqx-prometheus) does not support statsd, and the previous name may misunderstand users, so we have corrected it now and will support the standard statsd and dogstatsd in emqx v5.0.

tigercl avatar Jul 29 '20 01:07 tigercl