Access VerneMQ status and metrics from external/remote machine

919 Views Asked by At

Maybe it's a simple question but I don't succeeded to find the solution:

  • On a Ubuntu machine(v16) I installed VerneMQ (IP is 192.168.56.103)
  • I need on a Windows 7 machine (IP is 192.168.56.1), to access to the metrics and status pages of VerneMq (:8888/metrics or :8888/status) page

Locally on the VM of Ubuntu that works well with "localhost:8888" or "127.0.0.1:8888" but not with "192.168.56.103:8888". On the Windows host machine, It doesn't work when I try "192.168.56.103:8888"

On the Ubuntu I started to open port in all direction I can, at the end I even stopped totally the firewall with

sudo ufw disable

Notes:

  • I can access to the apache server on 192.168.56.103:80 (after I disable the firewall)
  • I tried to change VerneMq default port, that change nothing to the problem
  • On Nmap I have "Failed to resolve "192.168.56.103:8888"" <- it maybe mean the problem is somewhere else...
  • On Netstat I have "tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 6621/beam.smp "

Thanks all!

1

There are 1 best solutions below

1
On

There is a config value in the vernemq.config file for that. The default is set to listener.http.default = 127.0.0.1:8888. This explains all of the behaviour you're seeing.

If you want to expose the metrics/scraping listener on the public IP, you can do that, of course. Keep in mind that the metrics HTTP endpoint is not authenticated, so you might want to configure your firewall accordingly to limit access to it.