Giter Club home page Giter Club logo

Comments (6)

mzy2240 avatar mzy2240 commented on August 19, 2024

Passed the ping pong test, so should not be port or db issue.

from ticktock.

ytyou avatar ytyou commented on August 19, 2024

Please set the log.level to 'HTTP'; run the same command; and then send us the log file. Thank you.

from ticktock.

ylin30 avatar ylin30 commented on August 19, 2024

b'put cpu _usage 1674096240.256369 0'

@mzy2240 First, I would like to point out that your payload has some format problems. There is a space between "cpu" and "_usage". I guess your metric is supposed to be "cpu_usage".

Second, according to Opentsdb API standard (http://opentsdb.net/docs/build/html/user_guide/writing/index.html), each data point must come with at least one tag (e.g., "host=host1" at the end).

Third, the timestamp1674096240.256369 looks weird to me. It is supposed to be a long.

Last, there is a bug in our codes (v0.10.1) which is triggered by writing data points not having a tag. We are checking in a hotfix right now, and being tested. With the hotfix, even without specifying a tag in data points, they can still succeed.

Hope the hotfix will be available in one day. We will notify you once it is ready.

You can refer to this link for some read and write examples. https://github.com/ytyou/ticktock/wiki/Usage-Examples

Thank you very much for your help to make TT better.

from ticktock.

mzy2240 avatar mzy2240 commented on August 19, 2024

First, I would like to point out that your payload has some format problems. There is a space between "cpu" and "_usage". I guess your metric is supposed to be "cpu_usage".

Nice catch! That is a typo when submit the issue, not the actual payload. Sorry about that!

Second, according to Opentsdb API standard (http://opentsdb.net/docs/build/html/user_guide/writing/index.html), each data point must come with at least one tag (e.g., "host=host1" at the end).

Third, the timestamp1674096240.256369 looks weird to me. It is supposed to be a long.

These two might be the actual cause. Will give another try when the new patch released. Thanks!

from ticktock.

ylin30 avatar ylin30 commented on August 19, 2024

@mzy2240 v0.10.2 has been released in main branch. Please try it out. Here is the put and query commands for your example data.

ylin30@yi-IdeaPad:~$ curl -v -XPOST 'http://localhost:6182/api/put' -d 'put cpu_usage 1674096240.256369 0'
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:6182...
...
 HTTP/1.1 200 OK
 Content-Length: 0
 Content-Type: text/plain
ylin30@yi-IdeaPad:~$ curl -v 'http://localhost:6182/api/query?start=1674096200&m=avg:1m-avg:cpu_usage'
*   Trying 127.0.0.1:6182...
...
 HTTP/1.1 200 OK
 Content-Type: application/json
 Content-Length: 78

* Connection #0 to host localhost left intact
[{"metric":"cpu_usage","tags":{},"aggregateTags":[],"dps":{"1674096240":0.0}}]

If you have any issues, very welcome to contact us.

Again, thanks for making TT better.

from ticktock.

mzy2240 avatar mzy2240 commented on August 19, 2024

Thanks! Keep up the great works!

from ticktock.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.