I am using the grafana hosted on the one server and I am using the Influxdb as a datasource which is hosted on the another server.While adding the datasource I am facing the 502/401 error. Also the both servers are not exposed to internet.
can anyone helpme on this
http://localhost:8086 as the url. That is only correct if influxdb is on the same machine as grafana. You have to use the ip address of the influxdb server, not localhost.
@clanlaw Since I am using the different server I need to use the Influxdb IP instead of localhost. Am i right ??
The URL you put in that field is the URL where Grafana will find influxdb server running, so yes, you have to put the IP address of the computer running Influxdb.
Would it not have been quicker just to try it rather than asking again?
Now you have the wrong port number.
By the way, you can paste images directly into a post, which makes it much easier to see them.
There is not much point just posting an image showing that you have corrected the port number without telling us whether it has fixed it or not, and if not then what the error now shows.
same 502 error
as per your suggestion i have changed the port and tested still its showing the same error.
And I forget to mention that the servers that I am using are not exposed to internet.
Can you ping 10.130.116.96 from the grafana machine?
Is port 8086 open on the influx server (if you don’t know how to do that then use a search engine, it depends on the operating system).
On the grafana server can you connect to the the influx server? Run this command on the grafana server to check.
influx -host 10.130.116.96
Also I presume that you have checked that influx is running ok, so on the influx server run
from the influxdb server
from the grafana server
Well normally if I want to use a command and it is not installed then I install it. You want the influxdb command line tools. On Ubuntu I think that comes from influxdb-client.
but I am using the RHEL 7 servers for that also i need to install the influxdb-client for the grafana server
The purpose is in order to determine whether the problem is accessing Influx, or whether it is a grafana issue.
However, it would be worth looking at the Influx logs first in case there is a clue there.
I could see only the grafana server are not able to ping the influxdb server. But in the reverse manner i tried influxdb is able to ping the grafana server.
That suggests to me that your InfluxDB server, or some router between it and
yoour Grafana server, is running a firewall which is allowing connections out
from the InfluxDB machine (and corresponding replies back again) but is
blocking inbound connections to the InfluxDB machine from the Grafana server.