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

allow sending in multiple data points at once #61

Open
dougthor42 opened this issue Feb 13, 2019 · 0 comments
Open

allow sending in multiple data points at once #61

dougthor42 opened this issue Feb 13, 2019 · 0 comments

Comments

@dougthor42
Copy link
Owner

It would be very nice if we could send in multiple data points at once.

With JSON, it's probably pretty easy. Structure could look like:

{
   "data":[
      {
         "metric": "foo.bar",
         "value": 15
      },
      {
         "metric": "foo.baz",
         "value": 9.16581
      },
      {
         "metric": "foo.foo",
         "value": -136.9981
      }
   ]
}

Obviously if the timestamp is not included then all values should have the same timestamp, as given by when the data was received.

With the plaintext protocol... it might be a little more difficult. Perhaps we separate things with a special character, set by the user in trendlines.cfg? Any whitespace after the character is ignored. In this example, I'm using semicolon ;:

echo "foo.bar 15; foo.baz 9.16581; foo.foo -136.9981" | nc $SERVER $PORT
echo "foo.bar 15 1550079504; foo.baz 9.16581 1550079504; foo.foo -136.9981 1550079504" | nc $SERVER $PORT
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

No branches or pull requests

1 participant