Closed fl0wx closed 2 years ago
Same here. The module does not take in account that X-Forwarded-Host and X-Forwarded-Proto can be defined. But this looks like an upstream issue (icingaweb2) instead of a module error.
A solution to this is to pass the host argument to the next server (for ex. ProxyPreserveHost), so that icingaweb2 is "listening" on this hostname. A new virtualhost may be needed for this.
was an issue with balancer config
Expected Behavior
The graphs schould be shown
Current Behavior
if i access the icingaweb2 host directly the graph is loaded as expected. If i try to access the icingaweb2 host not directly, but with a loadbalancer, then the graphs arent shown.
Reason could be the "getBaseUrl" function.
this codefragment generates always a baseurl with the icingaweb2 host, not the balancerhost: https://github.com/Mikesch-mp/icingaweb2-module-grafana/blob/2cae443a51f964f01f83b59c5d206bba08bd944d/library/Grafana/ProvidedHook/Grapher.php#L219
I havent found any configuration property to change that behavior.
here is the function which is called by the grafana module: https://github.com/Icinga/icingaweb2/blob/b75cf362b8f3a64a028fd88c7cf8b40cfddb4c84/library/Icinga/Web/Url.php#L196
Your Environment
icinga2 --version
): 2.11.3icinga2 feature list
):icinga2 daemon -C
):