Timeseries dashboard getting single point

Hello, Team!

I have an http url that returns a JSON response, and I’m using the infinity plugin to create a dashboard with timeseries, but it only returns a single point value, not previous values.

Reponses Sample:

Values will change every minutes

{
“event”: “GoodEvents”,
“podName”: “alliswell”,
“lastCheckedUTCTs”: “2023-06-08T12:22:30.018Z”,
“totalConnected”: “34”,
“totalPType”: “9”,
“totalJType”: “3”,
“totalBType”: “8”,
“totalWType”: “3”,
“totalFIType”: “11”
}

Graph:

Thanks
Sathish

Welcome @sathish121393

I wish grafana does this by default but you need to use the following transformation

@yosiasz Thank you for responding so quickly.

I have an API that has that information. The device count will vary every few minutes, and I would like to catch those spikes.

https://mocki.io/v1/41496e6f-c097-4ee5-ae01-271cb227f6d8

How it will work here, Please help on this.

DId you try what I Posted?

Infinity or any json plugin can’t track and store metrics over time unless your API returns. The job of the plugin is just to retrieve the data and pass it to grafana dashboard.

If you want to track those numbers over time, you need to store those information in Prometheus or any other time series database. Recorded queries or Prometheus exporters are good options.

1 Like

Hello, @yosiasz

Which plugin did you use to accomplish this… I don’t get this… Please guide me.

Thanks!
Sathish

I’ll try this @yesoreyeram Thank you so much! Do we have any other options on this?

Hi @yosiasz

I don’t get the what you have shown in your screenshot.

Thanks
Sathish R

Its not a plugin, it is the transform tab that comes with every data source.

@yosiasz

So, what type of datasource I should configure here for this transform,

https://mocki.io/v1/41496e6f-c097-4ee5-ae01-271cb227f6d8

Thanks

@yosiasz

Could you please send me the JSON file for the dashboard you created for me?

Or

Screenshot of Query page and Convert field type transform page

Thanks

1 Like

oh sorry. infinity plugin should work nicely for that.

here is dashboard

@yosiasz

This is great! I had this kind of dashboard, and I would like to see a time series graph for the same with a single response.

Note: this sample one

Thanks

Are you asking a question? We seem to be going in circles :large_blue_circle:

@yosiasz

Hi @yosiasz

I can able to do whatever you shown in the last screenshot through infinity plugin.

I would like get the Time series dashboard for the same data.
https://mocki.io/v1/41496e6f-c097-4ee5-ae01-271cb227f6d8

Is that possible or not that is my question?

Thanks!

no you cannot because you have only 1 single time: "Time":"2023-06-09T07:56:19.483Z"

The key word here is series. series which is defined as “a number of events coming one after another.” you do not have a number of events hence no series.

@yosiasz

Yeah…Now I get your point. Thank you @yosiasz

1 Like