Bad lines connection

I’m using a grafana server running on an AWS EC2 Ubuntu server 18.04. I’m using linksmart sensorthings to retrieve datas from a sensorthings format API (provided by FROST-Server). When i make a simple request using grafana dashboard, the result should be a continuous graph (with only one line). But the result looks like this :

So there is bad/wrong connections between points, i’ve also export the datas from grafana and made the same chart in excel and the result does not have this noisy lines.
I’ve also checked the database inside the API server and everything is fine and sorted, also the same for the request response.

The global configuration of grafana is pretty much the default one, i only change some auth settings.

Do you have any idea why there is those lines ?

Thanks in advance for your help !

I have never seen anything like that, but I wonder whether that could happen if your query was not returning the data correctly sorted by time.

OK i will look further, thanks for the advice !

Like clanlaw says, almost definitely because the data is not sorted in ascending order.

This does raise an interesting question for me, should I include an explicit ORDER BY in my query when using MySQL and/or Influx?

Unfortunately Linksmart Sensorthings does not provide a raw query editor or a way to add the “orderby” setting :confused:
I can connect Grafana directly to the DB of my sensorthings API but it’s not what I want.

I’m not sure about your question clanlaw but if it can add some “security” just do it.

I have just checked the Influx docs and there is says that Influx defaults to returning data sorted by time, so no need to do it there. Perhaps you need to check the Sensorthings docs to see what it says. If it is returning data in the wrong order then perhaps there is an issue with Sensorthings or the plugin.
Is this relevant or is it something else entirely?

Yes i know this option but the plugin does not send requests with the orderby setting, and there is no way to enable it as i can see.
I’ll try to make an issue on Linksmart sensorthings and keep this thread updated.
Thanks !

Check how you are putting the data in, if you manually supply timestamps perhaps they are wrong or the data is getting added at the wrong time or something.

Yep this could be something to check, thanks !