In my graph panel the current value will become inaccurate when the time range changed

I have a problem.If I expand the time range (for example when I change “Last 1 hour” to “Last 15days ”) the current value on the graph panel will change and the value is wrong.I also found that the graph would be wrong , and some obvious points would be removed.
I want to know why and how to solve it?

What query are you using? If you are using something like mean() then several samples may be averaged which can be confusing, particularly with channels that normally have discrete values such as 0 and 1. When the graph is compressed then values such as 0.5 may be shown. If that is the issue then you might want to consider using max or min rather than mean.

Thank you for your reply.



Look at the two pictures please. I didn’t use the query like mean(). They displayed the status of the same time , but the time ranges were different. Note the following current values , which are quite different.

What type of data source is that?
Also, considering the Bits sent metric. What does that mean in the real world? How often are values added to the database?

The data source is Zabbix.The new values are added once in 5 minutes or 3 minutes.
I found that some people on the Internet said that the reason for this problem is that the points on the graph panel are limited. In a large time ranges, because the number of points exceeds the limit, grafana will ignore some points that makes the graph inaccurate. But I don’t understand why the current value is inaccurate.

What do you see in the Query Inspector?

This is what I see in the Query Inspector.
{
“xhrStatus”: “complete”,
“request”: {
“method”: “POST”,
“url”: “http://xx.xx.xx.xx/zabbix/api_jsonrpc.php”,
“data”: {
“jsonrpc”: “2.0”,
“method”: “history.get”,
“params”: {
“output”: “extend”,
“history”: “3”,
“itemids”: [
“53251”
],
“sortfield”: “clock”,
“sortorder”: “ASC”,
“time_from”: 1588014093,
“time_till”: 1588035693
},
“id”: 1,
“auth”: “7c9a2d1df5185c7763465126679ba989”
}
},
“response”: {
“jsonrpc”: “2.0”,
“result”: [
{
“itemid”: “53251”,
“clock”: “1588014215”,
“value”: “0”,
“ns”: “485965704”
},
{
“itemid”: “53251”,
“clock”: “1588014515”,
“value”: “0”,
“ns”: “567448211”
},
{
“itemid”: “53251”,
“clock”: “1588014815”,
“value”: “0”,
“ns”: “165608739”
},
{
“itemid”: “53251”,
“clock”: “1588015115”,
“value”: “0”,
“ns”: “447566525”
},
{
“itemid”: “53251”,
“clock”: “1588015415”,
“value”: “0”,
“ns”: “474879839”
},
{
“itemid”: “53251”,
“clock”: “1588015715”,
“value”: “0”,
“ns”: “134546751”
},
{
“itemid”: “53251”,
“clock”: “1588016015”,
“value”: “0”,
“ns”: “371287407”
},
{
“itemid”: “53251”,
“clock”: “1588016315”,
“value”: “0”,
“ns”: “139373705”
},
{
“itemid”: “53251”,
“clock”: “1588016615”,
“value”: “0”,
“ns”: “344972878”
},
{
“itemid”: “53251”,
“clock”: “1588016915”,
“value”: “0”,
“ns”: “109568921”
},
{
“itemid”: “53251”,
“clock”: “1588017215”,
“value”: “0”,
“ns”: “380413289”
},
{
“itemid”: “53251”,
“clock”: “1588017515”,
“value”: “0”,
“ns”: “365293443”
},
{
“itemid”: “53251”,
“clock”: “1588017815”,
“value”: “0”,
“ns”: “532473508”
},
{
“itemid”: “53251”,
“clock”: “1588018115”,
“value”: “0”,
“ns”: “150498931”
},
{
“itemid”: “53251”,
“clock”: “1588018415”,
“value”: “0”,
“ns”: “156079738”
},
{
“itemid”: “53251”,
“clock”: “1588018715”,
“value”: “0”,
“ns”: “240219294”
},
{
“itemid”: “53251”,
“clock”: “1588019015”,
“value”: “0”,
“ns”: “360042836”
},
{
“itemid”: “53251”,
“clock”: “1588019315”,
“value”: “0”,
“ns”: “183823755”
},
{
“itemid”: “53251”,
“clock”: “1588019615”,
“value”: “0”,
“ns”: “466602318”
},
{
“itemid”: “53251”,
“clock”: “1588019915”,
“value”: “0”,
“ns”: “97193386”
},
{
“itemid”: “53251”,
“clock”: “1588020215”,
“value”: “0”,
“ns”: “283357027”
},
{
“itemid”: “53251”,
“clock”: “1588020515”,
“value”: “0”,
“ns”: “378526976”
},
{
“itemid”: “53251”,
“clock”: “1588020815”,
“value”: “1”,
“ns”: “595020784”
},
{
“itemid”: “53251”,
“clock”: “1588021115”,
“value”: “0”,
“ns”: “314577278”
},
{
“itemid”: “53251”,
“clock”: “1588021415”,
“value”: “0”,
“ns”: “267403587”
},
{
“itemid”: “53251”,
“clock”: “1588021715”,
“value”: “0”,
“ns”: “524702927”
},
{
“itemid”: “53251”,
“clock”: “1588022015”,
“value”: “0”,
“ns”: “608076771”
},
{
“itemid”: “53251”,
“clock”: “1588022315”,
“value”: “0”,
“ns”: “484764229”
},
{
“itemid”: “53251”,
“clock”: “1588022615”,
“value”: “0”,
“ns”: “184079995”
},
{
“itemid”: “53251”,
“clock”: “1588022915”,
“value”: “0”,
“ns”: “356990991”
},
{
“itemid”: “53251”,
“clock”: “1588023215”,
“value”: “0”,
“ns”: “502158286”
},
{
“itemid”: “53251”,
“clock”: “1588023515”,
“value”: “0”,
“ns”: “319543718”
},
{
“itemid”: “53251”,
“clock”: “1588023815”,
“value”: “1”,
“ns”: “377740150”
},
{
“itemid”: “53251”,
“clock”: “1588024115”,
“value”: “0”,
“ns”: “330547400”
},
{
“itemid”: “53251”,
“clock”: “1588024415”,
“value”: “0”,
“ns”: “639221811”
},
{
“itemid”: “53251”,
“clock”: “1588024715”,
“value”: “0”,
“ns”: “13777956”
},
{
“itemid”: “53251”,
“clock”: “1588025015”,
“value”: “0”,
“ns”: “377321379”
},
{
“itemid”: “53251”,
“clock”: “1588025315”,
“value”: “0”,
“ns”: “553337449”
},
{
“itemid”: “53251”,
“clock”: “1588025615”,
“value”: “0”,
“ns”: “593092554”
},
{
“itemid”: “53251”,
“clock”: “1588025915”,
“value”: “1”,
“ns”: “635886049”
},
{
“itemid”: “53251”,
“clock”: “1588026215”,
“value”: “0”,
“ns”: “620913178”
},
{
“itemid”: “53251”,
“clock”: “1588026515”,
“value”: “0”,
“ns”: “166558832”
},
{
“itemid”: “53251”,
“clock”: “1588026815”,
“value”: “1”,
“ns”: “435861023”
},
{
“itemid”: “53251”,
“clock”: “1588027115”,
“value”: “0”,
“ns”: “530881153”
},
{
“itemid”: “53251”,
“clock”: “1588027415”,
“value”: “0”,
“ns”: “424176065”
},
{
“itemid”: “53251”,
“clock”: “1588027715”,
“value”: “0”,
“ns”: “473132205”
},
{
“itemid”: “53251”,
“clock”: “1588028015”,
“value”: “0”,
“ns”: “359468524”
},
{
“itemid”: “53251”,
“clock”: “1588028315”,
“value”: “0”,
“ns”: “434716257”
},
{
“itemid”: “53251”,
“clock”: “1588028615”,
“value”: “0”,
“ns”: “148632551”
},
{
“itemid”: “53251”,
“clock”: “1588028915”,
“value”: “0”,
“ns”: “179274249”
},
{
“itemid”: “53251”,
“clock”: “1588029215”,
“value”: “0”,
“ns”: “43361648”
},
{
“itemid”: “53251”,
“clock”: “1588029515”,
“value”: “0”,
“ns”: “188650379”
},
{
“itemid”: “53251”,
“clock”: “1588029815”,
“value”: “1”,
“ns”: “160298364”
},
{
“itemid”: “53251”,
“clock”: “1588030115”,
“value”: “0”,
“ns”: “86721260”
},
{
“itemid”: “53251”,
“clock”: “1588030415”,
“value”: “0”,
“ns”: “637788056”
},
{
“itemid”: “53251”,
“clock”: “1588030715”,
“value”: “0”,
“ns”: “513294985”
},
{
“itemid”: “53251”,
“clock”: “1588031015”,
“value”: “0”,
“ns”: “876395157”
},
{
“itemid”: “53251”,
“clock”: “1588031315”,
“value”: “0”,
“ns”: “290381977”
},
{
“itemid”: “53251”,
“clock”: “1588031615”,
“value”: “0”,
“ns”: “346554810”
},
{
“itemid”: “53251”,
“clock”: “1588031915”,
“value”: “1”,
“ns”: “247519460”
},
{
“itemid”: “53251”,
“clock”: “1588032215”,
“value”: “0”,
“ns”: “354769283”
},
{
“itemid”: “53251”,
“clock”: “1588032515”,
“value”: “0”,
“ns”: “157155909”
},
{
“itemid”: “53251”,
“clock”: “1588032815”,
“value”: “0”,
“ns”: “415959549”
},
{
“itemid”: “53251”,
“clock”: “1588033115”,
“value”: “0”,
“ns”: “754741245”
},
{
“itemid”: “53251”,
“clock”: “1588033415”,
“value”: “0”,
“ns”: “298956862”
},
{
“itemid”: “53251”,
“clock”: “1588033715”,
“value”: “0”,
“ns”: “428300730”
},
{
“itemid”: “53251”,
“clock”: “1588034015”,
“value”: “0”,
“ns”: “727781155”
},
{
“itemid”: “53251”,
“clock”: “1588034315”,
“value”: “0”,
“ns”: “254051740”
},
{
“itemid”: “53251”,
“clock”: “1588034615”,
“value”: “0”,
“ns”: “725075783”
},
{
“itemid”: “53251”,
“clock”: “1588034915”,
“value”: “0”,
“ns”: “412359333”
},
{
“itemid”: “53251”,
“clock”: “1588035215”,
“value”: “0”,
“ns”: “429178998”
},
{
“itemid”: “53251”,
“clock”: “1588035515”,
“value”: “0”,
“ns”: “628475453”
}
],
“id”: 1
}
}

Does that data agree with the chart?

I don’t know how to see if the data matches the chart. But when the time range is less than 6 hours , the chart agree with the graph in zabbix. When the time ranges are greater than 6 hours , the graphs maybe different.