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

Supporting all subdirectories in paths #45

Open
lucasnorman opened this issue Apr 27, 2021 · 3 comments
Open

Supporting all subdirectories in paths #45

lucasnorman opened this issue Apr 27, 2021 · 3 comments

Comments

@lucasnorman
Copy link

This is a suggestion for a nice to have. Consider the below conf file:

fsImagePath : $FSIMAGE_PATH

skipFileDistributionForGroupStats : true

skipFileDistributionForUserStats : false


paths:
  - '/data/*'

skipFileDistributionForPathStats : true

skipFileDistributionForPathSetStats : true

I would like metrics displayed for all the subdirectories under data. This way I can create a Prometheus query that automatically picks up new paths added and I don't have to add them to the conf file. Currently an error is thrown saying the path could not be found. Please let me know your thoughts.

@marcelmay
Copy link
Owner

Thx alot for the suggestion.

Paths support regex matching for child directories, this should bring the result you want (metric per child directory):

paths:
  - '/data/.*'

Note the dot-and-star .* in the example, matching any subdirectory.

@lucasnorman
Copy link
Author

lucasnorman commented Apr 27, 2021 via email

@marcelmay
Copy link
Owner

For now you'd have to specify all the child dirs.

Out of curiosity, what is your use case for for-all-dirs instead of path-aggregated metrics?
How many dirs would that be?

In a classical datalake scenario, I'd recommend to either use eg by user or group stats.
Or for assets with mixed-user-and-groups a top level asset approach like /datalake/.* or the pathSets option (multiple paths aggregated as metric).

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

No branches or pull requests

2 participants