OpenTSDB

GreptimeDB supports ingesting OpenTSDB via HTTP API.

GreptimeDB also supports inserting OpenTSDB metrics via HTTP endpoints. We use the request and response format described in OpenTSDB’s /api/put.

The HTTP endpoint in GreptimeDB for handling metrics is /opentsdb/api/put

Note: remember to prefix the path with GreptimeDB’s http API version, v1.

Starting GreptimeDB, the HTTP server is listening on port 4000 by default.

Use curl to insert one metric point:

  1. curl -X POST http://127.0.0.1:4000/v1/opentsdb/api/put -d '
  2. {
  3. "metric": "sys.cpu.nice",
  4. "timestamp": 1667898896,
  5. "value": 18,
  6. "tags": {
  7. "host": "web01",
  8. "dc": "hz"
  9. }
  10. }
  11. '

Or insert multiple metric points:

  1. curl -X POST http://127.0.0.1:4000/v1/opentsdb/api/put -d '
  2. [
  3. {
  4. "metric": "sys.cpu.nice",
  5. "timestamp": 1667898896,
  6. "value": 1,
  7. "tags": {
  8. "host": "web02",
  9. "dc": "hz"
  10. }
  11. },
  12. {
  13. "metric": "sys.cpu.nice",
  14. "timestamp": 1667898897,
  15. "value": 9,
  16. "tags": {
  17. "host": "web03",
  18. "dc": "sh"
  19. }
  20. }
  21. ]
  22. '