prometheus can't get metrics from private ip.
Hi, I use docker Prometheus to monitor API running on Linode ubuntu server. According to the instructions, the target part will enter
- targets: ['ip-private:port']
but the result is not as expected, I can't get the data from the API to track.
I'm using ufw to protect the server, and when I check the log I see docker interface can't connect to ip-private, I think that's why Prometheus can't get the data. What do I need to do to fix this.
These are logs:
Jul 25 06:26:21 fe kernel: [2943772.604998] [UFW BLOCK] IN=br-351495ad124a OUT= PHYSIN=veth9d8a772 MAC=02:42:83:37:79:2e:02:42:ac:13:00:05:08:00 SRC=172.19.0.5 DST=192.168.133.85 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=1186 DF PROTO=TCP SPT=45076 DPT=19723 WINDOW=64240 RES=0x00 SYN URGP=0
Jul 25 06:31:21 fe kernel: [2944072.599138] [UFW BLOCK] IN=br-351495ad124a OUT= PHYSIN=veth9d8a772 MAC=02:42:83:37:79:2e:02:42:ac:13:00:05:08:00 SRC=172.19.0.5 DST=192.168.133.85 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=50982 DF PROTO=TCP SPT=45110 DPT=19723 WINDOW=64240 RES=0x00 SYN URGP=0