Infinity Datasource plugin dashboard with multiple timeseries data

I am moving away from simple json datasource to infinity datasource for alerting functionality.
I am trying to provision the same existing dashboards using infinity datasource plugin.
I have these type of data structure.
Multiple number of names (target) and datapoints (value, timestamp) associated with them.

[
  {
    "datapoints": [
      [
        9.691442,
        1718613617621
      ],
      [
        9.306188,
        1718614018788
      ],
      [
        9.361603,
        1718614448729
      ]
    ],
    "target": "AAA"
  },
  {
    "datapoints": [
      [
        20.296214,
        1718613848344
      ],
      [
        23.544085,
        1718614207304
      ],
      [
        14.369337,
        1718614430032
      ],
      [
        17.845236,
        1718614820700
      ]
    ],
    "target": "BBB"
  },
  {
    "datapoints": [
      [
        147.347695,
        1718613696786
      ],
      [
        170.428573,
        1718614033027
      ],
      [
        95.308912,
        1718614245887
      ],
      [
        147.848532,
        1718614669018
      ]
    ],
    "target": "CCC"
  }
]

I am trying to somehow plot multiple lines on the same dashboard(for this example it is 3 but it can be arbitrary number). I can’t get this to work.

I converted the data structure on my API backend as this(In this example it should output 2 lines on the graph)

[
  {
    "timestamp": 1718613617621,
    "value": 9.691442,
    "name": "AAA"
  },
  {
    "timestamp": 1718614018788,
    "value": 9.306188,
    "name": "AAA"
  },
  {
    "timestamp": 1718614448729,
    "value": 9.361603,
    "name": "AAA"
  },
  {
    "timestamp": 1718613848344,
    "value": 20.296214,
    "name": "BBB"
  },
  {
    "timestamp": 1718614207304,
    "value": 23.544085,
    "name": "BBB"
  },
  {
    "timestamp": 1718614430032,
    "value": 14.369337,
    "name": "BBB"
  }
]

I used columns inside Parsing options & Result field
But I get just one line with all the values on the time series graph.
I can make arbitrary changes on my backend and feed the necessary data to infinity datasource dashboard but don’t know how to make multiple timeseries on the same dashboard to work.

Welcome to forum @kixos94415

Both data are not valid json data payloads. Please fix, test validity of json data and repost

1 Like

Updated as requested

1 Like

maybe this using UQL

I have converted my data to have labels

    "timestamp": 1718613848344,
    "value": 20.296214,
    "label": "BBB"

I have used standard
Parsing options & Result fields
Selector: timestamp as Timestamp format as Time ( UNIX ms )
Selector: label as Label format as String
Selector: value as Value format as Number

What I expect is that anything that has the same label should be on a separate line on the graph.
What I get is one continues line on the graph


I don’t even know where the A label is coming from.

I expect something like this.

For the alerting to work, the data returned by the data source needs to be in certain alert compliant format / grafana data frame format. Learn more about that here

In infinity case, we don’t have option anything other than backend parser for this data to be alert compatiable. Here is the sample alert setup with the data you provided. I am using JSONata expression $sort($,function($l,$r) {$l.timestamp > $r.timestamp }) to sort the results by timestamp so that the result will be compatiable with the data frame format.

Hi there, I have the same problem,


I made this query, but the response I am going to recieved is structured like this:

but I want to want is to graph this, just the value for each one related with the time,

Please help me.