Dashboard with 'single metric' shows 'Error fetching data'

CMK version:
2.2.0p18.cme

OS version:
Ubuntu 20.04.6 LTS

Error message:
Error fetching data

On my custom dashboards, I make use of the ‘Single Metric’ Dashlet. When the value to be displayed is large, it showns the “Error fetching data”.

I am pretty sure, that the root cause is the “high” value of 151277 which I want to display. Perhaps only 32-bit numbers are supported by ‘SingleMetric’ and ‘Gauge’? The ‘Single metric graph’ is not limited by this.

Here I demonstrate the problem:


The upper ‘SingleMetric’ and ‘Single metric graph’ show what happens if the number is small.

The lower Dashlets are identicial, but reference a metric which is large. How can i fix this? There seems to be no other dashlet, which can display a simple number.

The single metric dashlet can handle high numbers. I cannot reproduce it. This is however checkmk 2.3 which has a complete new metric/graph handling
Take a look at the web.log though.

@martinh: Thanks for your comment.

Unfortunately, web.log does not show anything.

I am sure, it worked in an earlier version of 2.2, but I have not kept a log of upgrade events. So I cannot tell for sure when it stopped working here. Upgrading to 2.3 is not an option right now for me, I have to wait till Fall for that. I notice, that your metric shows the unit ‘B’ and tried to test with RAM free as well. However, it shows In 2.2, I cannot specify a metric unit and RAM free shows GiB and not a large number:
image

I changed the metric definition to it being rendered in Bytes instead of GiB to test your hypothesis, that the dashlet can’t handle large numbers. In 2.3, changing the definition is very easy, that’s why I did it there.
I can not test/validate your issue in 2.2 at the moment, as I am doing community support only when I am commuting home.

OK, I tried one quick hack and modifed the file single_metric.py to read:

           # Live value
            data.append(
                {
                   ...
                    "value": metric["value"]/1000,
                   ...
                }
            )

And then it can display the 1000 times smaller value without problems. So the data is there, the problem is within the code rendering the output.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.