How to use SimpleJson plugin?

I feel like an absolute moron here.

I have added the SimpleJson plugin and provided a datasource which was tested successfully.

The datasource I used was .

I cannot for the life of me figure out how to use the data from the JSON output. Is there something I am missing here? Does the JSON output have to be in a specific format?

Any assistance would be appreciated.

Do you mean simple-json-datasource?

Read the plugin README for the data format it expects, and the the example backend implementation.

1 Like

Thank you. So I found this question asked by scavern. I am very new to Grafana, so please forgive my ignorance. My goal is also to develop something like simple-json-datasource plugin. Finally, it will be our own homegrown backend-webserver communicating with Grafana (via http/https requests). I understand that we will have to implement our_url/ , our_ur/search, our_ur/query and our_ur/annotations. But before doing that I would like to see all the above in action to investigate what the example-source sends. Is there some publicly available simple-json-datasource on the internet?

This is what I did so far:

  1. I installed grafana on windows mashine in directory c:\grafana-4.2.0 .
  2. I changed in c:\grafana-4.2.0\conf\custom.ini : http_port = 8080
  3. I copied directory simple-json-datasource-master (from GitHub) into C:\grafana-4.2.0\data\plugins
  4. I start the Grafana server C:\grafana-4.2.0\bin>grafana-server.exe
  5. I login as admin/admin and trying to add datasource. I am happy to see that one of the choices is SimpleJson, which means that Grafana successfully found the directory C:\grafana-4.2.0\data\plugins\simple-json-datasource-master.
  6. The next question below Grafana asks me is “http settings” and “http auth”. I understand that “access” should be “direct”, but I do not know what to answer in “Url” and “Http Auth” to view the example. Can you give me publicly available URL example on the internet>

Thank you very much

In the README for there is links to example implementation and details for what the returned json should look like.

The next question below Grafana asks me is “http settings” and “http auth”. I understand that “access” should be “direct”, but I do not know what to answer in “Url” and “Http Auth” to view the example. Can you give me publicly available URL example on the internet

The URL is the address to your simple-json data source http server. If you specify direct access make sure your data source http server supports CORS (need to return the correct CORS headers to be usable from another domain). If not specify proxy.


Thank you.

>In the README there is a link to example implementation

Actually I saw the link in the README you mentioned. But it is not a link to a “live” implementation. It is a link to a GitHub “implementation code” using node.js . I do not not have node.js experience, but probably will have to get it…, thank you, So I take it that there is no “live implementation” available which would allow me to see the example right away…

>make sure your data source http server supports CORS (need to return the correct CORS headers…)

Thank you for pointing my attention to this. I will add the CORS headers to our server responses…

Please forgive me for bugging you with this again. I installed node.js, started the example from, successfully added a datasource, added a dashboard with two rows : graph and table. Both “graph” and “table” show “no data points” no matter which time range I select (including last 5 years) How can I see something in the graph? Thank you

I am new to Grafana as well, and unfortunately I am not a dev either, so this is a bit challenging for me.

I had a read through the simplejson docs but I am still not certain how to proceed.

I am using the hosted Grafana so I am not sure how to read any error messages etc. or see how the plugin is parsing the JSON output.

Below is an example of the JSON ouput. Is the format correct?


{ “timestamp”:1490686556996,“bid”:“14262.00”,“ask”:“14265.00”,“last_trade”:“14300.00”,“rolling_24_hour_volume”:“377.851419”,“pair”:“XBTZAR”}

Does not look like anything in the example in the README I told you to look at :slight_smile:, See example response!

and unfortunately I am not a dev either

I am sorry you need to be a dev to do this.

Hi, I’m on the exact step as you are. Just getting to installing node.js. Is there any examples that you found online that helps? Anything guidance would be helpful. Thanks.

Hi jjsung,
As you see above nobody answered me back in March. I finally succeeded to see the data but sometimes it worked and sometimes did not. The GUI, though looked beautiful, was not that simple even for experienced user… So for now, I stopped with Grafana…

Hi I am running java program in a server which response with json format , I am able to see the data in browser .
but when I give same url to simple json plugin …
it showing error " No data points from data query " .
can I know what might be problem .

The json needs to be in the specified format detailed in the simple json readme

For everyone struggling with SimpleJson plugin -

  1. If you looks at the code of the index.js
    else {
    var k = _.filter(timeserie, function(t) {
    return ===;
    So k will be initialized only if the each element of the passed input has a parameter target of targets
    …targets: [{“target”: “upper_75” , “type”: “timeserie”}]

  2. To plot the value in the Graphana dashboard you need to pass on the input - “metric” from each panel. Click the panel title -> Edit and then select metric type and value
    Save it and you will have the data plotted.

I am also planning to build something cool with this plugin and it took me a while to figure this out. I guess I will open a pull request on the SimpleJson README


1 Like

after going through the exchanges, pl correct me …all the changes are to be done to the server side index.js from where requested json is generating.

[A.] I have updated the NodeJS code as per the comments
GitHub URL:

[B.] Added Screen Prints to configure the DataSource in Grafana

How to use adhocfilters in post requests?
My request is like bellow.

But in github simple json datasource’s documentation says that your post request can have add hoc filters as bellow.

How can I do this?

1 Like

output =

I want to map keys as columns and values as rows for grafana table in python Dynamically or hard coded columns but not rows is also fine.please help me out guys it would be greately appreicated.

I have just the same problem here. In the changelog it is written that adhocFilters are supported but I can not find a way to configure my panel to use it. (Send the appropriate request).

Well I just found out how to manage that ! We must use Variables Use it as addHocFilters and that will add them for all panel in dashboard. Of course you need to implement tag-keys and tag-values endpoints.


And in the request I can see the filters


Hope this helps.

Readme file is not clear at all. What exactly is the format to feed grafana? As a paid customer, I am surprised to find that support does not cover simple json. Please point me in the right direction.