Hi,
I have setup DataYours, it works very well.
I do store the graphite db file on a Synology NAS.
I am trying to connect Grafana (http://grafana.org) to “DataYours - Graphite” running on the Vera.
Within Grafana, there is an option to set a “Data Source” up with Graphite. A url seems to be required like “http://ip-address:port”.
I’m not familiar with Grafana, but very keen to see third-party tools linked to [tt]DataYours[/tt] (since GUIs are really a pain to develop, it’s always a good plan to use something good someone else has crafted.)
I’ll try to take a look and see what’s required. It may take an extra tweak of the code (or, I suppose, it might be a bit more than that) but let’s find out.
OK, well at first sight it looks like it should be:
vera-ip-address:3480/data_request?id=lr_
…since the usual Graphite URL requests starts with “dashboard” “render” which it ought to append to the above. It’s possible that it won’t like this syntax. See if it gets you any further.
One thing I’m not sure of is what protocol it uses for directory browsing… it’s apparent not in the extensive URL API documentation - I may have to delve into their source code.
OK, I see that it appends “/render”, rather than just “render” to the request…
…I attach a modified version of [tt]DataGraph.lua[/tt] (still compatible with everything else) which should get over this particular problem. You now need to put the following into the Grafana URL box:
Ok, just to be sure … I have uploaded your file via Vera / Develop Apps / Luup Files / Upload.
I guess the original file gets overwritten ?
I have rebooted the VeraEdge box - just to be sure.
It dos not seem to work - yet
Here is the error reported via Safari / Dev Console:
[Error] XMLHttpRequest cannot load http://192.168.10.51:3480/data_request?id=lr_grafana/render. Origin http://192.168.10.5:3000 is not allowed by Access-Control-Allow-Origin. (new-dashboard, line 0)
[Error] Object
(fonction anonyme) (app.6e379bdb.js, line 10)
(fonction anonyme) (app.6e379bdb.js, line 10)
i (app.6e379bdb.js, line 10)
(fonction anonyme) (app.6e379bdb.js, line 10)
$eval (app.6e379bdb.js, line 12)
$digest (app.6e379bdb.js, line 12)
$apply (app.6e379bdb.js, line 12)
h (app.6e379bdb.js, line 10)
q (app.6e379bdb.js, line 10)
v (app.6e379bdb.js, line 10)
[Error] Object
(fonction anonyme) (app.6e379bdb.js, line 10)
(fonction anonyme) (app.6e379bdb.js, line 10)
i (app.6e379bdb.js, line 10)
(fonction anonyme) (app.6e379bdb.js, line 10)
$eval (app.6e379bdb.js, line 12)
$digest (app.6e379bdb.js, line 12)
$apply (app.6e379bdb.js, line 12)
h (app.6e379bdb.js, line 10)
q (app.6e379bdb.js, line 10)
v (app.6e379bdb.js, line 10)
[Log] Panel data error: (app.6e379bdb.js, line 23)
Object
[quote=“GL29, post:7, topic:187774”]Ok, just to be sure … I have uploaded your file via Vera / Develop Apps / Luup Files / Upload.
I guess the original file gets overwritten ?
I have rebooted the VeraEdge box - just to be sure.[/quote]
Yes, that’s all correct.
It dos not seem to work - yet ;-)
Here is the error reported via Safari / Dev Console:
I’m sorry, but this means nothing to me - I don’t do JavaScript or much web stuff at all.
I do note that the URL is using a POST method, and I’m not sure that Vera’s request handler routine copes with that. Most usually, requests to port 3480 are made with GET methods. Maybe someone else can help us out here.
I’m also trying to get DataYours to work with Grafana. I’m new to both products, so I’m not a font of knowledge on the subject but when I installed your patched lua, Grafana is not able to pull the metrics from the DataYours web UI and on the Vera I see the following message in the LuaUPnP.log:
LuaUPnP.log:02 01/18/16 16:44:03.435 JobHandler_LuaUPnP::REQ_Handler no handler for lr_grafana/metrics/find/?query=* <0x74b6c520>
When I try opening that URL in my browser I also get a “No handler” message.