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

Modules should allow specifying directory and auto-load all files with-in #267

Open
Pavaningithub opened this issue Jan 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Pavaningithub
Copy link

Request

When we are working with module, filename in module.file allows only filename.

Say for example if we configure a module with multiple river files, as show in the screenshot, when we call the module directory instead of file, we get below error.

image

module.file "metrics_logs_config" {
        filename = "/etc/agent/modules/"

        arguments {
                argument_name = {
...
        }
        }
}

Error:

/etc/agent/module.river:1:1: Failed to build component: building component: failed to read file: read /etc/agent/modules/: is a directory

As of now we can specify only a single file in module block. it would be great we can specify the module directory and flow mode auto load all files.

Use case

This helps in modularize the code and handle the components in multiple files.

@Pavaningithub Pavaningithub added the enhancement New feature or request label Jan 22, 2024
Copy link
Contributor

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it.
If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue.
The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!

@rfratto rfratto transferred this issue from grafana/agent Apr 11, 2024
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

1 participant