Reputation: 309
Is it efficient to store multiple metrics in a single series? There is support for multiple columns, but it seems that at least based on the 0.9 documentation that there is a preference towards a single series per metric and a column for value.
What I'm looking at is a way to store some related data (such as hd free, used, total) and having 3 separate series seems like a pain and would most certainly complicate queries that need to be made across the series.
Are there some general best practices for storing metrics such as these?
Upvotes: 2
Views: 984
Reputation: 1836
InfluxDB 0.9 will happily support up to 255 fields per series. The examples in the docs mostly have single field examples with a field key of "value" but there's nothing preventing you from having multiple fields. Since fields aren't indexed it should have no performance impact at all.
For example, here's a point with three field values:
{
"database": "mydb",
"points": [
{
"measurement": "disk",
"tags": {
"host": "server01",
"type": "SSD"
},
"time": "2009-11-10T23:00:00Z",
"fields": {
"free": 318465464,
"used": 682324110,
"total": 1000789574
}
}
]
}
Upvotes: 1