Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RegExp for custom dimension #1030

Open
SCadilhac opened this issue Jan 8, 2024 · 3 comments
Open

RegExp for custom dimension #1030

SCadilhac opened this issue Jan 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@SCadilhac
Copy link

Hello,

Thanks for the great work on this project.

It would be great to be able to derive custom dimensions from other fields (e.g. interface description) using regular expressions.
From my understanding, this sits in between two existing mechanisms:

  • Classifiers - Expr-based rules, executed by the ingestion code; can use RegExp, but only apply to predefined dimensions (Connectivity, Provider).
  • Custom dictionaries - Executed by Clickhouse upon data insertion, custom configured dimensions, but implement only CSV lookup at the moment.

What would be the right direction to go?

@SCadilhac SCadilhac added the enhancement New feature or request label Jan 8, 2024
@vincentbernat
Copy link
Member

I would check if the appropriate functionality is present in ClickHouse. I don't think this is possible, but maybe this is and this will make everything easier.

@vincentbernat
Copy link
Member

@margau any advice?

@margau
Copy link
Contributor

margau commented Jan 22, 2024

Unfortunately, I have no proper dev setup available, therefore can't have a practical look at this right now.

It seems likely possible with CustomDicts (however, CustomDicts should be renamed then, because a RegExp is no dict lookup).

I could imagine some kind of switch between e.g. "DictLookup" and "Regex" source type in https://github.com/akvorado/akvorado/blob/main/common/schema/root.go#L91 with the later doing something e.g. with https://clickhouse.com/docs/en/sql-reference/functions/string-replace-functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants