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?
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:
I installed grafana on windows mashine in directory c:\grafana-4.2.0 .
I changed in c:\grafana-4.2.0\conf\custom.ini : http_port = 8080
I copied directory simple-json-datasource-master (from GitHub) into C:\grafana-4.2.0\data\plugins
I start the Grafana server C:\grafana-4.2.0\bin>grafana-server.exe
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.
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 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.
>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 https://github.com/bergquist/fake-simple-json-datasource, 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
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…
cloudviewnms
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 .
If you looks at the code of the index.js
else {
var k = _.filter(timeserie, function(t) {
return t.target === target.target;
});
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”}]
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
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.
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 Variable syntax | Grafana documentation. 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.
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.