Grafana plugin support through api?

grafana
#1

I used a little of influx 1.7 and made it work in a TIG+Mosquitto stack with docker-compose. Now I am interested in futerproofing since this project is in its early stages. But I really need the ability to make queries with an interval minimum of half a second, I can do this with Grafana editing a json file.

I don’t know anything of the influx api but that there it is one. Would it be a bad idea for me to start creating a beta integration with Grafana? or a better path should be to aim to change the dashboard of InfluxDB like I had with Grafana’s dashboard.

Any help? please.

#2

I’m not really sure what you’re asking, are you looking for a grafana influxdb integration? Or are you asking if you can render an influxdb query with group by time(something_less_than_1_s)?

If the latter you should be able to do this now by specifying the time duration (e.g. 500ms for 0.5s):

1 Like
#3

I mean the refresh time of the query, I am trying to see live the “stream” of data, which is a couple of hz, sent by a sensor. I am seeing that the max refresh rate of the graph is of about 5s.
image
I want to change this to 0.5s
On Grafana I can do this but I can find no integration yet. Actually it is the reason of why I use Grafana instead of Chronograf, and I am assuming that the dashboard provided on influx 2.0 is actually a seamless integration with it right?

Anyways, hope I cleared it and hope I could help somehow. And also great work! makes my projects look like I actually know what I am doing haha.

#4

Ah now I see what you’re referring to! AFAIK you cannot change these options from a setting and would have to amend the frontend code in the same way you’ve done with grafana.

We can submit this as a feature request for v2.0 and see where it takes us!

#5

YES! that is what I was looking for. Could be a good feature request as you said. I would be glad to try this out “hard coding it” and compiling to see the performance. Can you help me? haven’t work with go yet, so it would be a first for me trying to compile it (probably building it as a docker image). How do I compile the project?

#6

So these are the frontend assets and they don’t need the go backend. Would need to review the Makefiles to see how to build each component independently, similar to how you can do with grafana.

#7

hmm, bit lost here. But found on the readme (sorry, did not read it fully early) a build from source guide with make. Will fork this, modify that file, and test luck.

Did you meant that? or what do you mean by each component.

#8

Yep, that’s what I mean!

With grafana (at least a while back) you were able to build the frontend or backend independently of one another (or both together obviously). This meant you could make changes to the frontend all day long and rebuild without having to touch any of the backend bits.

I haven’t personally customized chronograf yet but if they tell you how to do that in the README then you should be set! Keep us posted on how it goes!

#9

First, I did it! it’s working marvelously.

#10

Second, Actually I found this on the InfluxDB git README

#11

which led me to believe I had to build the hole thing, but after the first build, if I modify a file like that, it just compiles that module automatically:

#12

but anyway, it is working and it is good enough for me; probably will make this mod in to a docker image for my use. If this is going to be a feature request I have to add: that the way of modifying this in Grafana is by changing a json file directly on the web interface, like you said… just messing with the frontend. But Grafana is just a step further because it does not has to compile anything, just adds the value then a page and maybe cache refresh.

Inspecting the js file of the web page found a variable with the data of autoRefreshes.ts. I saw somewhere it was loading from ‘src/share/constants’ (maybe it was other thing)

I believe adding an option to change and save these values are the way to go.

Anyways, thanks for the help so far.

PS: sorry for the multiple replies, the page wouldn’t let me post multiple pictures because I’m a new user

1 Like