-
Notifications
You must be signed in to change notification settings - Fork 206
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
Support write/query via OpenTSDB API #904
Comments
## Rationale Part of #904 ## Detailed Changes ## Test Plan 1. write some data points ``` curl --location --request POST 'http://127.0.0.1:5440/opentsdb/api/put' --data-ascii ' [ { "metric": "sys.cpu.nice", "timestamp": 1687935743000, "value": 18, "tags": { "host": "web01", "dc": "lga" } }, { "metric": "sys.cpu.nice", "timestamp": 1687935743000, "value": 18, "tags": { "host": "web01" } } ] ' ``` 2. select ``` curl --location --request POST 'http://127.0.0.1:5440/sql' --data-ascii ' SELECT * from "sys.cpu.nice" ' ``` the response: ``` { "rows": [ { "tsid": 1890867319031064034, "timestamp": 1687935743000, "dc": null, "host": "web01", "value": 18.0 }, { "tsid": 7054964577922029584, "timestamp": 1687935743000, "dc": "lga", "host": "web01", "value": 18.0 } ] } ```
I would like to work |
Thanks for you interests, let us know when you have any problems. Generally speaking, you need to convert opentsdb query syntax to datafusion plan, you can refer how InfluxQL is implemented here: |
I find it's very hard to me current 😢😢,I give up to others this issue. |
@parkma99 😅 Thanks anyway, you can try other issue first. |
## Rationale Part of apache#904 ## Detailed Changes ## Test Plan 1. write some data points ``` curl --location --request POST 'http://127.0.0.1:5440/opentsdb/api/put' --data-ascii ' [ { "metric": "sys.cpu.nice", "timestamp": 1687935743000, "value": 18, "tags": { "host": "web01", "dc": "lga" } }, { "metric": "sys.cpu.nice", "timestamp": 1687935743000, "value": 18, "tags": { "host": "web01" } } ] ' ``` 2. select ``` curl --location --request POST 'http://127.0.0.1:5440/sql' --data-ascii ' SELECT * from "sys.cpu.nice" ' ``` the response: ``` { "rows": [ { "tsid": 1890867319031064034, "timestamp": 1687935743000, "dc": null, "host": "web01", "value": 18.0 }, { "tsid": 7054964577922029584, "timestamp": 1687935743000, "dc": "lga", "host": "web01", "value": 18.0 } ] } ```
This docs explain how opentsdb query is executed:
Understanding the order of operations is important. When returning query results the following is the order in which processing takes place. |
Describe This Problem
Currently there are three query language supported in CeresDB: SQL/InfluxQL/PromQL. It would be great to also support OpenTSBD query API.
Proposal
There are many API in OpenTSDB, the following two API are most important, so we can first implement those.
Additional Context
No response
The text was updated successfully, but these errors were encountered: