influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.97k stars 3.56k forks source link

Separate tags from extra metadata #5258

Open mitar opened 8 years ago

mitar commented 8 years ago

It would be great to have support for extra metadata which could be changed, but not part of the tags one can query over.

kostko commented 8 years ago

+1

beckettsean commented 8 years ago

@mitar can you provide an example use case for this, and perhaps even a syntax that works for you?

mitar commented 8 years ago

Sure. We have a Python library which we are trying to port to InfluxDB. We then use Django, to provide dashboard over this library. So in tags, we store information like UUID of the device/sensor collecting data. But also some extra data used for visualization in the dashboard. See examples here. For example, our metadata is for one time-series is:

{
  'title': "Routes",
  'description': "Number of routes installed in the kernel routing tables.",
  'visualization': {
    'type': 'line',
    'initial_set': False,
    'time_downsamplers': ['mean'],
    'value_downsamplers': ['min', 'mean', 'max'],
    'minimum': 0.0
  }
}

So metadata is useful for displaying, but you do not really query by it (maybe you could query for all time-series data which can be visualized with a line, but we are not really doing that at the moment).

On the other hand, we store additional tags (for us everything are tags) which help our uses find time-series stream. Things like device/sensor UUID, its name, etc. For example, complete metadata we store with time-series for the above example:

{
  node: "6b7d3c2f-818a-4fd5-8db5-d15f6d2878eb",
  visualization: {
    time_downsamplers: [
      "mean"
    ],
    minimum: 0,
    type: "line",
    initial_set: false,
    value_downsamplers: [
      "min",
      "mean",
      "max"
    ]
  },
  description: "Number of routes installed in the kernel routing tables.",
  title: "Routes",
  registry_id: "system.resources.network",
  type: "integer",
  name: "routes"
}

Now, the tricky thing is that values can change. Things like node, type would not change, others might change through time. So it would be great to be able to store this metadata in, change it, and optionally query by it. It could be that those are two separate things (query tags and extra metadata) or the same thing (just tags you cannot modify and metadata you can). Now that I look, it seems that we might want to change also values for tags we want to query over (like our registry_id keyword).

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mitar commented 5 years ago

I find this still relevant.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mitar commented 5 years ago

I find this still relevant.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mitar commented 4 years ago

I find this still relevant.