giropops-monitoring icon indicating copy to clipboard operation
giropops-monitoring copied to clipboard

Prometheus not connecting in netdata on host docker

Open dancristi4n opened this issue 6 years ago • 2 comments

Hi,

I followed the instructions on "How To", but getting an error on Prometheus job 'netdata' Apparently, it's can't connect to host/node.

prometheus.yml:

  • job_name: 'netdata' metrics_path: '/api/v1/allmetrics' params: format: [prometheus] honor_labels: true scrape_interval: 15s static_configs: - targets: ['localhost:19999']

Error:

Get http://localhost:19999/api/v1/allmetrics?format=prometheus: dial tcp 127.0.0.1:19999: connect: connection refused

How configure the prometheus.yml?

Thanks for advance.

dancristi4n avatar Sep 30 '19 18:09 dancristi4n

I found the solution. It's necessary configure the host:

sudo sysctl net.ipv4.conf.all.forwarding=1 sudo iptables -P FORWARD ACCEPT

These settings do not persist across a reboot, so you may need to add them to a start-up script.

dancristi4n avatar Oct 01 '19 02:10 dancristi4n

@dancristi4n how do you add in the startup script?

KesleyDavid avatar Jan 12 '21 13:01 KesleyDavid