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

filestat - not clear how to add multiple patterns in include #33262

Closed
lucian-vanghele opened this issue May 28, 2024 · 9 comments
Closed

filestat - not clear how to add multiple patterns in include #33262

lucian-vanghele opened this issue May 28, 2024 · 9 comments
Labels
question Further information is requested receiver/filestats Stale

Comments

@lucian-vanghele
Copy link

Component(s)

receiver/filestats

Describe the issue you're reporting

I'm looking at how to add different paths in the include config key. From what I see the only option is to create new receiver for each path. Is that correct?

@lucian-vanghele lucian-vanghele added the needs triage New item requiring triage label May 28, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@lucian-vanghele
Copy link
Author

one more thing: I enabled file.count metric, it works but there's no attribute/label (I'm using prometheus) to tell me which path is actually about.

@crobert-1 crobert-1 added the question Further information is requested label May 28, 2024
@crobert-1
Copy link
Member

  1. It looks like the only option for including multiple paths is using globbing, otherwise you'd have to define multiple receivers.
  2. You have to enable the file.path resource attribute, as referenced in documentation. You can enable by including the following block in your receiver config:
resource_attributes:
  file.path:
    enabled: true

@atoulme atoulme removed the needs triage New item requiring triage label May 28, 2024
@atoulme
Copy link
Contributor

atoulme commented May 28, 2024

With @crobert-1 answers you will be ok. Please feel free to file separate enhancements if you like more help. Please close this issue if you are unblocked.

@lucian-vanghele
Copy link
Author

  1. you mean something like /(etc|var)/.config ...hmm, might work in some cases
  2. I already have it, works for other metrics but not for file.count. And btw, what would be the value of file.count for an input value like the one above? One single value but then what will be the file.path value?

@lucian-vanghele
Copy link
Author

anyone?

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jul 31, 2024
@atoulme
Copy link
Contributor

atoulme commented Aug 1, 2024

No, globbing means: /var/log/*.log https://man7.org/linux/man-pages/man7/glob.7.html
file.count reports the number of files reporting in.

@atoulme
Copy link
Contributor

atoulme commented Aug 1, 2024

Closing - feel free to reopen or open new issues as needed.

@atoulme atoulme closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested receiver/filestats Stale
Projects
None yet
Development

No branches or pull requests

3 participants