Grafana-server: configuring for remote visibility

Posted on
Fri Jun 15, 2018 1:16 pm
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

Grafana-server: configuring for remote visibility

I'm stuck on a small problem. Right now I can access grafana via a browser running on my server, but can't access it from other machines on my LAN.

I think I ran into a similar problem when I had first (3-4 months ago) installed my own copy of grafana (running an earlier version of the grafana/influxdb plugins) and at that time I think I fixed it by making a simple change to the grafana config file, providing the domain name of the machine running grafana. But now when I try to access, I don't get an error (no 404, no "host not found", etc.), I just see a progress bar seemingly partially loading the page but it stops and nothing else happens.

Now I'm running grafana as installed and configured by Grafana Home Dashboard plugin. So, before I go poking at settings I thought check to see if others are having a similar problem. Also, if I make changes, where should they go and will they be overwritten by new plugin installs?

I see config files indigo.ini and default.ini. Looks like they are almost identical except for the log and data directories being set to the values indicated in the settings in the plugin's config dialog. As an experiment, I modified the line "domain = localhost" in the file to use the local domain name of my server instead of "localhost" in the file indigo.ini. I restarted grafana-server process and I was able to access from across remote machines. So, problem solved ... maybe?

Some questions: are others having this issue as well? Does the setting of domain only matter "sometimes" - i.e., when set to the default value of localhost, it will work sometimes but not others? Will this setting get overridden if I re-install the plugin?

Grafana docs seem to hint that this setting is important (only?) if using GitHub of Google Auth. http://docs.grafana.org/installation/co ... on/#domain .... though what I observed suggests maybe that's not the whole story.

Posted on
Fri Jun 15, 2018 2:28 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: Grafana-server: configuring for remote visibility

I routinely access my Grafana instance from all over my local network, and I have not changed the default domain = localhost setting that is in the config. I'm not positive, but I only think that setting matters if you have enforce_domain turned on.

If you do edit the config, make sure you also edit both defaults.ini and indigo.ini. The plugin will recreate the indigo.ini from time to time, and it uses the defaults.ini as a template.

If you find you need this setting changed, I can expose it in the plugin dialog. But, judging by my testing, I dont think this setting is acting as a firewall and preventing your server from being accessed.

You might want to check the firewall settings for your Mac, or test by accessing your Grafana from another machine via the local ip of the grafana server.

Posted on
Fri Jun 15, 2018 5:53 pm
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Grafana-server: configuring for remote visibility

vtmikel wrote:
I routinely access my Grafana instance from all over my local network, and I have not changed the default domain = localhost setting that is in the config. I'm not positive, but I only think that setting matters if you have enforce_domain turned on.


Thanks for the reply.

This was a strange symptom and I hesitated before posting the question because I thought that it had been working for me previously across the LAN in the default configuration, too. Then in the last couple of days, it somehow stopped working.

So now I am wondering if as I build up a more and more complex page in Grafana, I somehow added an element that "broke" it. So far, my main dashboard page has graphs, singlestats, and discrete elements -- nothing "exotic".

To be more rigorous in my experiment, I'll try changing the config file back to "localhost" and see if it causes my LAN access to stop working again. Otherwise, it might be that the change I observed was a side-effect of restarting grafana rather than due to change in config.

I'll report back if I come up with a more definitive cause.

Posted on
Sat Jun 16, 2018 5:38 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: Grafana-server: configuring for remote visibility

Let me/us know what you find. Any changes you make to the config files will be blown away during upgrades of the plugin. You can prevent the plugin from overwriting your indigo.ini by also changing the defaults.ini, but again, that won't persist through a plugin update. Recommend seeing if there is a difference between accessing the server via IP, versus via hostname name.

Also, you may want to look at whether the "Access" method for your data sources is set to Server, or browser. I recommend Server. this means that Your browser connects to Grafana, Grafana connects to Influx. When you go into Access mode, your browser connects to grafana, and your browser also connects directly to Influx.

Mike

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron