Pushing metrics to prometheus server via prometheus remote write from netdata
I have netdata installed in one of my computers and I want to export data to my prometheus server (both Ubuntu).
But I can't use prometheus' pull system, I need the metrics to be pushed from netdata to prometheus.
Netdata has prometheus remote write implemented in its exporting engine and I am able to configure it to send metrics to my server PC just fine.
But I can't see the metrics in prometheus at all, although I know the metrics are being sent to the server PC as I can see them by listening on the port I'm pushing to, via netcat.
So I think that my prometheus config is wrong.
This is my netdata exporting config:
[prometheus_remote_write:prometheus_receiver] enabled = yes destination = 192.168.5.45:9090 remote write URL path = /write #username = admin #password = admin data source = average prefix = netdata # hostname = my_hostname # update every = 10 # buffer on failures = 10 # timeout ms = 20000 # send names instead of ids = yes # send charts matching = * send hosts matching = *
And this is my prometheus config:
global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: - job_name: "prometheus" static_configs: - targets: ["localhost:9090"] remote_read: - url: http://localhost/api/v1/write remote_timeout: 30s
If I open the page localhost:9090/api/v1/write I expected to be able to see the metrics pushed from netdata, but instead I get a blank page that says "Method Not Allowed".
I execute prometheus with the flags --web.enable-admin-api --web.enable-remote-write-receiver.
Any clue on what I'm doing wrong?