gnocchixyz / gnocchi

Timeseries database
Apache License 2.0
299 stars 85 forks source link

how to store multivariate timeseries data in gnocchi #944

Closed ramesh-chowdeshetty closed 6 years ago

ramesh-chowdeshetty commented 6 years ago

I want to store multiple values at single timestamp like below

[{"timestamp":"2018-07-25 01:03:04","value":32,"value":45,"value":55}]

is it possible in gnocchi using single metric (on a single request).

sileht commented 6 years ago

I really don't see why we would do that...

Just store them in 3 metrics with same timestamp and use /v1/aggregates API to retrieve them in one API call

ramesh-chowdeshetty commented 6 years ago

thank you for your reply, in that case if i have 100 values at one timestamp , i need to request db 100 times. will it be scalable in production.

Here is my requirements i have timeseries csv file which contains multiple columns and i made rest api to store this into gnocchi. as you said if i create multiple metric for every column, i needs to call my rest api many times. Instead is there any solution to store entire csv file at a time in gnocchi.

sileht commented 6 years ago

The batch API POST /v1/batch/resources/metrics/measures allows you to post all measures at once. If you pass ?create_metrics=true, it will even create the metrics automatically for you.

more info here: https://gnocchi.xyz/rest.html#batch