i wish to monitor disk space on my Ubuntu Server. I’ve installed Grafana, logged into http://myserverip:3030 & logged into admin, changed the password and then gone to add a Data Source.
Does the name “prometheus” resolve to an IP address on your Grafana server?
If not, then DNS is the problem, otherwise:
Log in to the Prometheus machine and (as root) look at the output of the
command “netstat -lptn”
You either want to see Prometheus (I assume that’s the name of the service,
I’m not familiar with it) listening on port 9090, or perhaps listening on some
other port.
If Prometheus is listening on port 9090, I suspect you have a firewall
problem between the Grafana server and the Prometheus server.
If it’s not listening on port 9090 but instead on some other port, try using
that in your data source definition in Grafana.
If Prometheus isn’t listening on any port at all, then I suspect it’s simply
not running. Start it (check for any errors) and then give Grafana another
go.
Does the name “prometheus” resolve to an IP address on your Grafana
server?
Fallen at the first hurdle. How do i check that?
“ping prometheus” would be a reasonable start.
Alternatively “host prometheus”.
Could i not, when hosting on the server, just point to the loopback as a
data source http://127.0.0.1:9090
If Prometheus is running on the same machien as Grafana, then yes.
When as root i netstat -iptn
So, I see nothing there (a) listening on port 9090, or (b) looking like it
might be prometheus.
Therefore i think you have got the last of my suggestions:
“If Prometheus isn’t listening on any port at all, then I suspect it’s simply
not running. Start it (check for any errors) and then give Grafana another
go.”