3 ms·
Not sure if I got the question, but during indexing e.g. cpu.total{env=prod,host=a} [id: 1] you insert cpu.total;env=prod and cpu.total;host=a entries with id 1
by misiek08 2y ago
Not sure if I got the question, but
during indexing e.g. cpu.total{env=prod,host=a} [id: 1] you insert cpu.total;env=prod and cpu.total;host=a entries with id 1.
then you get cpu.total{env=prod,host=b} [id: 2] and you end up with 3 entries:
cpu.total;env=prod => 1,2
cpu.total;host=a => 1
cpu.total;host=b => 2
If you query avg(cpu.total{env=prod}) you get [1, 2].
If you query avg(cpu.total{env=prod,host=a}) you get intersection([1, 2], [1]) which is [1].
- lopkeny12ko 2y ago> during indexing e.g. cpu.total{env=prod,host=a} [id: 1] Right, how do you know at write-time that cpu.total{env=prod,host=a} is ID 1? The user only supplies the metric name and tags.
- lopkeny12ko 2y agoLike, I can't imagine these are autoincrementing IDs. Because then every time a user writes a new value for cpu.total{env=prod,host=a}, you'd end up with a new unique timeseries ID.