-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an OpenTSDB datasource. #211
Conversation
This adds support for querying OpenTSDB for metric data.
nice! will take a look. |
Sorry, might not have time to look at this as I thought. So much other stuff to do. Do you know of a good docker file to test OpenTSDB? |
Unfortunately I don't. A quick search results in: Is there anything I can do to help speed up the review process? Would screenshots of the target editor help? |
I am sorry this is taking long. Just have a lot on my plate and my first attempt at docker opentsdb setup failed. But I will look at it again. Yes, some screenshots of the editor would be nice :) |
@mpage : Thanks for adding opentsdb support. |
@pradeepchhetri Thanks! Should make it easier for me to test. Felt bad for not having had time to setup opentsdb and get a feel for it so I can review and decide if this is something that should be integrated directly into Grafana. Most likely this should be fine. I just want to know what I merge into Grafana. I want to keep Grafana relatively well focused, and not be a dashboard for everything in order to keep it maintainable, polished and a great user experience. But I think the way the metric data sources work now, and metric editors, the separation is pretty good and can be better so maintaining different data sources should be fine and not create a maintainability issue in the future (hopefully). |
@torkelo Nice. I am great fan of opentsdb and one thing that opentsdb misses is one good dashboard, otherwise backend-wise its very strong. Having such a great dashboard for opentsdb will surely be widely accepted. Once you merge this code, i will surely let opentsdb community know about it. |
+1 it should be great to have this for opentsdb backends |
Tried this as well, getting a 405 error from opentsdb as grafana is sending the /query/api endpoint a request with the OPTIONS method. |
i confirm what @rtbellows told here: the request use an OPTIONS method to send query instead of GET Is there an equivalent way to setup DEBUG=true when using opentsdb instead of graphite metric database? |
Ah, OPTIONS method is fine, but you need to configure the OpenTSDB api correctly: http://opentsdb.net/docs/build/html/api_http/index.html#cors by default, CORS is disabled. After enabling it, I'm getting a different error, but the prefetch using OPTIONS method is fine. |
OpenTSDB does not add all of the required CORS headers to allow you to run Grafana on a different host, so I cooked up the following nginx config based on what I found at http://enable-cors.org/server_nginx.html to proxy the connection and add the correct/required headers. The following items need to be replaced by you:
Here's the config:
Once that bit of config is in nginx and running you need to update your |
Opened OpenTSDB/opentsdb#333 to add the missing Access-Control-Allow-Headers header. |
+1 Confirmed it does work with OpenTSDB. Doesn't show the tags in the key yet but it's a great start! I'd love to see this upstreamed. |
Quick caveat, doesn't look like the tags are being passed to OpenTSDB. Digging into that. |
NM, tags do work. Have to click the "+" symbol after adding it. |
Please sign the contributor license agreement http://grafana.org/docs/contributing/cla.html |
CLA signed. Please don't spam me 😛 |
Any update on this pull? The OpenTSDB fix I wrote has been merged by them. |
That is great news. Really sorry for this taking so much time. Will be working on grafana full time soon. |
Did now however get CORS to work with vanilla opentsdb, the OpenTSDB/opentsdb#333 did not make a difference. OpenTSDB even with that patch (used the "next" branch) does not like the OPTIONS http method. 405 not allowed method. Had to use nginx to proxy calls and to handle OPTIONS. |
I used this nginx config & docker repo to test opentsdb https://github.com/torkelo/opentsdb-docker/blob/master/nginx.conf |
Thanks for the pull! To enable CORS support in opentsdb you have to set the cors domain value in the config. By default it will disable the options verb without that set. I was able to point Grafana directly at my tsds with a wildcard domain and it worked beautifully. |
raintank logo on login screen
* return an error if no user was found * update condition (cherry picked from commit ec87405543fe8032a0c2769d3ec97536b7a749ef)
* return an error if no user was found * update condition (cherry picked from commit ec87405543fe8032a0c2769d3ec97536b7a749ef)
This adds support for querying OpenTSDB for metric data.