Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

indirectproxy mode refreshes graphs #142

Closed
prupert opened this issue Apr 10, 2018 · 5 comments
Closed

indirectproxy mode refreshes graphs #142

prupert opened this issue Apr 10, 2018 · 5 comments
Assignees
Milestone

Comments

@prupert
Copy link

prupert commented Apr 10, 2018

When using indirectproxy to load graphs it seems that the graphs get refreshed very frequently while the service page of Icingaweb2 is open in our browsers.

I could not find a way to disable this or change the frequency in the docs.

FYI, our config from /etc/icingaweb2/modules/grafana/config.ini:

[grafana]
username = "REDACTED"
password = "REDACTED"
host = "REDACTED"
protocol = "https"
height = "280"
width = "640"
enableLink = "yes"
defaultdashboard = "REDACTED"
defaultdashboardstore = "REDACTED"
datasource = "influxdb"
accessmode = "indirectproxy"
timeout = 2
@prupert prupert changed the title ìndirectproxy mode refreshes graphs indirectproxy mode refreshes graphs Apr 10, 2018
@Mikesch-mp
Copy link
Owner

Yes it does, but far less then the normal proxy mode which will load the image every 10 seconds. Indirect proxy refreshs the image only after the normal check interval of the service/host. This is done by setting the image header "cache-control".

@prupert
Copy link
Author

prupert commented Apr 11, 2018

Is there a way to disable reloading from the module?

@Mikesch-mp
Copy link
Owner

The module doesn't reload. It's icingaweb2 that refreshes pages every 10 seconds. But give me some days I will add an option to set cache time of the images in indirect proxy mode.

@prupert
Copy link
Author

prupert commented Apr 11, 2018

Awesome!

@jhuebner79
Copy link

jhuebner79 commented Feb 2, 2023

Sorry for commenting on an old issue, I would raise a new one if necessary. How would I start to debug if I see the image being re-rendered every ten seconds? Looking at the response headers, it seems the feature is not working in 1.4.2, or I may have a misconfiguration somewhere. (edit: I'm so sorry, it seems I was on master, not on v1.4.2 - with v1.3.6, which I now checked out manually, a version I know from another installation, everything seems okay now; I'll try v1.4.2 as well)

The setup is: AWS loadbalancer -> two targets in a group (two master servers each serving icingaweb2)

I'm using

protocol = "https"
accessmode = "indirectproxy"
authentication = "basic"
indirectproxyrefresh = "no" # I tried yes and no, but the behaviour did not change.
Response header of the .png
cache-control: no-store, no-cache, must-revalidate
content-type: image/png
date: Thu, 02 Feb 2023 08:49:53 GMT
expires: Thu, 19 Nov 1981 08:52:00 GMT
pragma: public
server: Apache/2.4.38 (Debian)
set-cookie: AWSALB=stuff; Expires=Thu, 09 Feb 2023 08:49:51 GMT; Path=/
set-cookie: AWSALBCORS=stuff; Expires=Thu, 09 Feb 2023 08:49:51 GMT; Path=/; SameSite=None; Secure

Request header
:authority: icinga2.ourdomain.de
:method: GET
:path: /grafana/img?host=builder&service=Memory%2520physical&panelid=3&timerange=now-12h&timerangeto=now&cachetime=57
:scheme: https
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-GB,en-US;q=0.9,en;q=0.8,de;q=0.7
cookie: stuff
referer: https://icinga2.ourdomain.de/dashboard
sec-ch-ua: "Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: stuff

Please advise on how I can help to get help with this, @Mikesch-mp, thanks for your time!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants