Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus not connecting in netdata on host docker #23

Open
dancristi4n opened this issue Sep 30, 2019 · 2 comments
Open

Prometheus not connecting in netdata on host docker #23

dancristi4n opened this issue Sep 30, 2019 · 2 comments

Comments

@dancristi4n
Copy link

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
Copy link
Author

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.

@KesleyDavid
Copy link

@dancristi4n how do you add in the startup script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants