Details
-
Story
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
29.0.0
-
None
-
None
-
Security Level: Default (Default Security Scheme)
-
None
Description
All of the TSDBs we have been working with support regular expression matching on tags (or labels).
By leveraging this fact, we can eliminate all the resource index related tag and replace these with a single tag that represents the resource path including the group name.
Such a tag would look like:
_resourceId=snmp:1:sinkConsumerMetrics:Telemetry-Netflow-5:org_opennms_core_ipc_sink
The logic in the TimeseriesSearcher can then be replaced to perform regular expressions against this path to find metrics with varying levels of depth beneath a given prefix.
Changes required to the TSS API
- Add TimeSeriesStorage#getMetrics(Collection<TagMatcher> matchers)
- Where TagMatcher contains (type,tag key,tag value) and type in {=,!=,~=,!~=}
- See https://github.com/prometheus/prometheus/blob/v2.27.1/prompb/types.proto#L76 for an example
- Deprecate existing TimeSeriesStorage#getMetrics() method
Changes required to the TSS Integration Layer
- Remove existing indexing logic and replace with a single '_path' tag as indicated above
- Update TimeseriesSearcher to operate against this new tag using regular expressions of the form `prefix(seprator?)
{1,depth}
`
- Revise caching in TimeseriesSearcher