Grafana 9.5.2 - simpod-json-datasource request targets.data option is a string value instead of array of object
kusuma-ms opened this issue · 6 comments
What happened:
simpod-json-datasource request targets.data option is a string value instead of array of object.
I upgraded from grafana 8.4.2 to 9.5.2 and see simpod-Json-datasource is upgraded to 0.6.2 and the data field is showing as string as shown below in grafana 9.5.2 request
{
“request”: {
“url”: “api/datasources/proxy/uid/sdu-ds/query”,
“data”: {
“app”: “panel-editor”,
“requestId”: “Q204”,
“timezone”: “browser”,
“panelId”: 8,
“dashboardId”: 19,
“dashboardUID”: “SOD_SD1”,
“publicDashboardAccessToken”: “”,
“range”: {
“from”: “2023-06-06T09:05:02.250Z”,
“to”: “2023-06-06T09:08:32.250Z”,
“raw”: {
“from”: “now-210s”,
“to”: “now”
}
},
“timeInfo”: “”,
“interval”: “100ms”,
“intervalMs”: 100,
“targets”: [
{
“datasource”: {
“type”: “simpod-json-datasource”,
“uid”: “sdu-ds”
},
“alias”: “”,
“bucketAggs”: [
{
“id”: “2”,
“settings”: {
“interval”: “auto”
},
“type”: “date_histogram”
}
],
“data”: "{“authServerOrSoftwareLevel”:“${AuthServer}”,“authGroup”:“${AuthGroup}”,“sessionFilter”:“${session_filter}”,“sessionRequest”:“detailPanel”}",
“metrics”: [
{
“id”: “1”,
“type”: “count”
}
],
“payload”: {},
“query”: “”,
“refId”: “A”,
“target”: “sessions”,
“timeField”: “@timestamp”,
“type”: “table”,
“editorMode”: “code”
}
],
“maxDataPoints”: 1481,
“scopedVars”: {
“data_source”: {
“selected”: false,
“text”: “StealthElasticSearch”,
“value”: “StealthElasticSearch”
},
“AuthServer”: {
“selected”: false,
“text”: “All”,
“value”: “All”
},
“AuthGroup”: {
“selected”: false,
“text”: [
“All”
],
“value”: [
“All”
]
},
“session_filter”: {
“selected”: false,
“text”: “”,
“value”: “”
},
“mainDashboardURL”: {
“selected”: false,
“text”: “/d/SOD1”,
“value”: “/d/SOD1”
},
“mainDashboardName”: {
“selected”: false,
“text”: “Stealth Operations Dashboard”,
“value”: “Stealth Operations Dashboard”
},
“__interval”: {
“text”: “100ms”,
“value”: “100ms”
},
“__interval_ms”: {
“text”: “100”,
“value”: 100
}
},
“startTime”: 1686042512250,
“rangeRaw”: {
“from”: “now-210s”,
“to”: “now”
},
“adhocFilters”:
},
“method”: “POST”,
“credentials”: “same-origin”,
“hideFromInspector”: false
},
“response”: [
null
]
}
In 8.4 version of Grafana the request body gives data as array of object .
{
“request”: {
“url”: “api/datasources/proxy/6/query”,
“data”: {
“app”: “dashboard”,
“requestId”: “Q155”,
“timezone”: “browser”,
“panelId”: 4,
“dashboardId”: 2,
“range”: {
“from”: “2023-06-06T09:15:12.910Z”,
“to”: “2023-06-06T09:18:42.910Z”,
“raw”: {
“from”: “now-210s”,
“to”: “now”
}
},
“timeInfo”: “”,
“interval”: “100ms”,
“intervalMs”: 100,
“targets”: [
{
“alias”: “”,
“bucketAggs”: [
{
“id”: “2”,
“settings”: {
“interval”: “auto”
},
“type”: “date_histogram”
}
],
“data”: {
“authServerOrSoftwareLevel”: “[“5.2.072.0”]”,
“authGroup”: “Config2”,
“sessionFilter”: “”,
“sessionRequest”: “detailPanel”
},
“datasource”: {
“type”: “simpod-json-datasource”,
“uid”: “sdu-ds”
},
“metrics”: [
{
“id”: “1”,
“type”: “count”
}
],
“payload”: “{“authServerOrSoftwareLevel”:”${SoftwareLevel}“,“authGroup”:”${AuthGroup}“,“sessionFilter”:”${session_filter}“,“sessionRequest”:“detailPanel”}”,
“query”: “”,
“refId”: “A”,
“target”: “sessions”,
“timeField”: “@timestamp”,
“type”: “table”
}
],
“maxDataPoints”: 1701,
“scopedVars”: {
“SoftwareLevel”: {
“text”: “All”,
“value”: [
“5.2.072.0”
]
},
“AuthGroup”: {
“text”: “Config2”,
“value”: “Config2”,
“selected”: false
},
“__interval”: {
“text”: “100ms”,
“value”: “100ms”
},
“__interval_ms”: {
“text”: “100”,
“value”: 100
}
},
“startTime”: 1686043122910,
“rangeRaw”: {
“from”: “now-210s”,
“to”: “now”
},
“adhocFilters”: ,
“endTime”: 1686043122923
},
“method”: “POST”,
“withCredentials”: false,
“hideFromInspector”: false
},
“response”: [
{
“columns”: [
{
“text”: “Session ID”,
“type”: “string”
},
{
“text”: “AuthServer ID”,
“type”: “string”
},
{
“text”: “Endpoint ID”,
“type”: “string”
},
{
“text”: “User”,
“type”: “string”
},
{
“text”: “Roles”,
“type”: “string”
},
{
“text”: “COIs”,
“type”: “string”
},
{
“text”: “License Type”,
“type”: “string”
},
{
“text”: “Profile”,
“type”: “string”
},
{
“text”: “Software Level”,
“type”: “string”
},
{
“text”: “IP Address”,
“type”: “string”
},
{
“text”: “OS”,
“type”: “string”
}
],
“rows”: [
[
“236297414668589797”,
“RCB-W19-EM”,
“RCB-W19-SAAS-2.RCTeam.Loc”,
“RCTeam\SAASAdmin”,
[
“AutoConfigInf:SAASRole”
],
[
“ServCOI”,
“LicenseCOI”,
“SSDCOI”,
“SVGCOI”,
“ADAccessFilterSet”
],
“server”,
“AutoConfig-Win64-Inf”,
“5.2.072.0”,
“10.101.101.4”,
“Windows Server 2019 Standard”
]
]
}
]
}
What did you expect to happen:
I expected Data to be array of object and return requested data
Maybe you have some redundant quotes somewhere?
This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.
No there are no redundant quotes,
simpod-json-datasource 0.4.2 version functions as expected with my query. issue is after 0.4.2 version.
IDK. Try grafana 9 with 0.5 first. etc. Find the version that breaks things for you. And if it's this plugin, ideally the commit.
This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.
This issue has not seen any activity since it was marked stale.
Closing.