Mikesch-mp / icingaweb2-module-grafana

Grafana module for Icinga Web 2 (supports InfluxDB & Graphite)
https://icinga.com/community/
GNU General Public License v2.0
241 stars 95 forks source link

grafana image render plugin points to localhost when clicked #253

Closed fireheadman closed 4 years ago

fireheadman commented 4 years ago

Expected Behavior

Grafana now requires the image render plugin to be installed in order to see the graphs in icinga Once this is completed, the graphs work, however if you click the graph, it will launch the grafana window and point to localhost host instead of the IPAddress of the icinga server.

This is causing a page not found condition. If you replace localhost with the IPAddress in the link (new window), then it works. Unsure what needs to be changed in the module to allow for the spawned window to launch with IPAdress or if there is a setting I can change on my side for this?

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

  1. navigate to client (ping graph or any service graph) image

  2. can also right click and copy link image This will get you http://x.x.x.x:3000/d/xxxxxxx/base-metrics?var-hostname=xxxxxxxx&var-service=hostalive&var-command=hostalive&from=now-6h&to=now&orgId=1&panelId=9&fullscreen

seems good at this point

  1. but it somehow get translated to this (http://localhost:3000/d/xxxxxxxx/base-metrics?from=now-6h&orgId=1&to=now&var-command=hostalive&var-hostname=clarorat05&var-service=hostalive&viewPanel=9)

and now it doesn't work....

  1. so if you substitute localhost for the IPAddress, then it works and I can see the data.

Context

Your Environment

R-Sommer commented 4 years ago

You simply need to go Configuration -> Modules -> grafana -> Configuration and change the entry for host from localhost:3000 to x.x.x.x:3000.

irodebush-wes commented 4 years ago

Uncomment and change the domain under the "Server" section in /etc/grafana/grafana.ini to your hostname or IP. The default config will redirect the link requests to localhost:3000.

fireheadman commented 4 years ago

@irodebush-wes ====>>>> This is the solution! I'm back online, thanks!