I have been trying to setup monitoring for a server which is on client side (unreachable).
One way I tried was prometheus remote write. As I am new to prometheus, I expected that Client prometheus will push the metrics to central prometheus further I can create a Grafana dashboard. I guess I am wrong, somehow I am getting this error:
"Failed to send batch, retrying" err="Post "http://xx.xx.xx.xx:9090/api/v1/write": context deadline exceeded"
I tried everything to solve this problem but nothing worked. Is it because both client and server prometheus are unreachable to each other? Is it necessary even in remote write config for prometheus to reach the endpoint? Any input is welcomed I am stuck for over months now.
UPDATE: I tried telegraf and influxdb instead of central prometheus this time both client prometheus and telegraf can ping eachother still I am getting the same error:
"Failed to send batch, retrying" err="Post "http://xx.xx.xx.xx:1234/receive": context deadline exceeded"