Skip to content
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

feat: support opentsdb put api #1037

Merged
merged 8 commits into from
Jun 29, 2023
Merged

Conversation

zouxiang1993
Copy link
Contributor

@zouxiang1993 zouxiang1993 commented Jun 27, 2023

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"
    }
}
]
'
  1. 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
    }
  ]
}

@zouxiang1993 zouxiang1993 marked this pull request as draft June 27, 2023 12:15

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@zouxiang1993 zouxiang1993 marked this pull request as ready for review June 28, 2023 07:40
@jiacai2050
Copy link
Contributor

@zouxiang1993 Please update PR description to tell us how you tests this.

Copy link
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiacai2050 jiacai2050 merged commit 3c113b5 into apache:main Jun 29, 2023
@zouxiang1993 zouxiang1993 deleted the opentsdb-put-api branch July 3, 2023 03:06
jiacai2050 pushed a commit that referenced this pull request Jul 3, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
## Rationale
Add tests for #1037 

## Detailed Changes


## Test Plan
dust1 pushed a commit to dust1/ceresdb that referenced this pull request Aug 9, 2023
## 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
    }
  ]
}
```
dust1 pushed a commit to dust1/ceresdb that referenced this pull request Aug 9, 2023
## Rationale
Add tests for apache#1037 

## Detailed Changes


## Test Plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants