fifemon / graphql-datasource

Grafana datasource plugin to query data from a GraphQL API
https://grafana.com/grafana/plugins/fifemon-graphql-datasource
Other
63 stars 33 forks source link

Plotting TimeSeries from NewRelic NerdGraph #68

Open siddjoshi opened 3 years ago

siddjoshi commented 3 years ago

Hi,

I am trying to get some timeseries data from newrelic graphql api. below is the response i am getting from graphql query

{
  "data": {
    "actor": {
      "entity": {
        "nrdbQuery": {
          "results": [
            {
              "beginTimeSeconds": 1630989900,
              "endTimeSeconds": 1630990500,
              "average.apm.service.apdex": 0.006239771279270337
            },
            {
              "beginTimeSeconds": 1630990500,
              "endTimeSeconds": 1630991100,
              "average.apm.service.apdex": 0.004462152694422367
            },
            {
              "beginTimeSeconds": 1630991100,
              "endTimeSeconds": 1630991700,
              "average.apm.service.apdex": 0.006847208108040821
            }

          ]
        }
      }
    }
  }
}

Now I am not finding documentation on how can I specify the time field. I tried various options and none of it seem to work. Below are the combinations i tried for Time Path (and not working)

actor.entity.nrdbQuery.results.0.beginTimeSeconds actor.entity.nrdbQuery.results.beginTimeSeconds actor.entity.nrdbQuery.results[*].beginTimeSeconds actor.entity.nrdbQuery.results[].beginTimeSeconds

Can anyone please assist me on what exactly I should be specifying in 'Time Path'

Regards Siddharth

lidalei commented 1 year ago

Data Path: actor.entity.nrdbQuery.results Time Path: beginTimeSeconds Time format: X