Browser Dashboard "Error fetching data"

Hello!
I get this error message after I have an Edge tab open in the background for some time (1-2 hours).

How can I fix this, especially because we want to hang a screen with the dashboard in the future that should show the dashboard all day?

We use SAML authentication as the login method

CMK version: 2.2.0p27
OS version: Windows 11Version 10.0.22631 Build 22631
Error message: Error fetching data

We’ve had exactly the same thing at home for a few updates now.

We have CheckMk permanently displayed on a browser tab (the latest version of Firefox) on a giant screen, and every morning we get the “Error fetching data” error. We’re obliged to refresh the page, it holds up well all day afterwards, and the next day we start all over again.

CMK version: 2.3.0p12
OS version: Debian 12
Error message: Error fetching data

I have seen this in the past as well. I am not at all a web developer.

But from what I can tell, this happens, if the browser “suspends” the tab or the connection to the Checkmk site gets lost somehow (think “network outage”, or “firewall dropping connections”). A good old refresh should always clear this.

Can you comment on whether these assumptions are correct:

  • This happens after several hours or even a day, not earlier after a refresh.
  • A refresh resolves the issue every time.

You can disable the login timeout in the user settings.

You could also write a java script that scans for “Error fetching data” and triggers a refresh automatically if thats feasable for you. Would look something like:

function Error() {
var pageText = document.body.innerText;
if (pageText.includes("Error fetching data")
window.location.reload();
        }

So it can’t be related to the token lifetime of the azure login session? This does not happen with a normal checkmk user with username and passsword

Have you checked for Session controls set in your Enterprise Application?
You can set sign in frequency there. I’m not sure if this actually affects the CheckMK Session timeout.

grafik

You can find it from Entra ID → Enterprise Applications → Your App → Security → Conditional Access

I can only find policies there. Where exactly do you find this option?

There are also some chrome/edge addons available, which could refresh a page from time to time.

You need to modify or create a policy to change that setting.
To check if its set you will have to click on each policy you see there.
If you see a selected control under “Session” check if Sign-in frequency is set:

grafik

From there you see on the right the Sign-in frequency:

Very good suggestion, I’ll test the idle timeout and see tomorrow if it happens again.

The browser tab pausing is also a probability. This corresponds to setting the browser.tabs.unloadOnLowMemory variable to False in Firefox’s about:config.

Thank you

We are now certain that this is not due to a network drop or firewall block. We have also verified that there is no suspicious CRON.

Ok, back to the news

Nothing solved the problem. In the morning, between 8:20 and 8:50, the interface crashes and always displays “Error fetching data”.

I can confirm:

  • It’s not a network problem
  • that it’s not a problem with the browser’s tabs being put to sleep
  • It’s not a problem with the Login Timeout setting in the settings

I don’t know what else to check

It has never done this to us after more than 3 years of use, starting with the last 4 updates.

But refreshing the page still helps, right? So using e.g. an add-on, which automatically reloads the page every X amount of time will work as a workaround, right?

Refreshing the page helps

1 Like

Yes and no,

We display CheckMk on a giant screen in an IT service office without a keyboard or mouse. We still have to log in if the page refreshes.

We too. I also still need a fix for this issue

I’ve set up a direct login with URL injection for our restricted user. No need to log on to the supervision screen. We’ll check tomorrow morning to see how it behaves.

Well… Well, the problem is the same… even with automatic refresh.

1 Like

If you are using a restricted Guest user Account, you could save the credentials in Firefox, install an Addon like Greasemonkey and add a java script that automatically clicks the login button if it detects the login mask.

(function() {
    'use strict';

    function clickLoginButton() {
        const loginButton = document.getElementById('_login');
        if (loginButton) {
            loginButton.click();
        }
    }

    window.addEventListener('load', function() {
    setTimeout(clickLoginButton, 4000);
    });
})();

Thank you for your response, but when the “Error fetching data” occurs, there is no login button, simply because there is no return to the login screen. Therefore, it is unfortunately not applicable.