Redis › RedisTimeSeries
How does RedisTimeSeries handle labels and how can you use them to query across multiple related time series at once?
AdvancedAnswer
You can attach labels, which are key value metadata pairs, to a time series when creating it, and use TS.MRANGE with a label based filter expression to query across all time series matching those labels simultaneously, which is especially useful when you have many similar time series, such as one per server or sensor, and need to analyze them together.
TS.CREATE cpu_usage:server1 LABELS region 'us-east' role 'web'
TS.MRANGE - + FILTER region=us-eastReal-world example A cloud infrastructure monitoring system labels each server's CPU usage time series with its region and role, letting an operator query the combined CPU usage trend across every web server in a specific region with a single command.