Hi,
I am trying to create a dashboard with simplejson data source which we have created.
We have created a simple data source datasource configured with the rest api url which we exposed (in http settings of dashboard we have configured the rest url http://localhost:8060 which we exposed) and grafana is running in 8080 port number. We have exposed the rest GET method and tested the data source which is working fine and could able to see the response. But configuring the same data source in dashboard we couldn’t able to get the metrics and response. It is giving 404 method not found error. Below is the error while creating dashboard.
Possibly unhandled rejection: {“err”:{“data”:null,“status”:-1,“config”:{“method”:“POST”,“transformRequest”:[null],“transformResponse”:[null],“jsonpCallbackParam”:“callback”,“url”:“http://localhost:8060”,“data”:{“target”:""},“headers”:{“Content-Type”:“application/json”,“Accept”:“application/json, text/plain, /”},“retry”:0},“statusText”:"",“xhrStatus”:“error”},“cancelled”:true}
The datasource is configured in such a way that it is giving a response like this below format.
{
“panelId”: 1,
“range”: {
“from”: “2016-10-31T06:33:44.866Z”,
“to”: “2016-10-31T12:33:44.866Z”,
“raw”: {
“from”: “now-6h”,
“to”: “now”
}
},
“rangeRaw”: {
“from”: “now-6h”,
“to”: “now”
},
“interval”: “30s”,
“intervalMs”: 30000,
“output”: [
{ “name”: “hello1”, “classNmae”: “A”, “type”: “timeserie” },
{ “name”: “hello2”, “classNmae”: “B”, “type”: “timeserie” }
],
“format”: “json”,
“maxDataPoints”: 550
}
We are pretty new to grafana so we couldn’t able to figure out what is missed. We implemented rest through GET method but not POST.
Please help us to sort out.
Thanks.