-
Notifications
You must be signed in to change notification settings - Fork 247
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
Add module library path parameter #828
Comments
Hello, thanks for the enhancement request :) We are planning to add relative path support for import.file which may solve your problem:
If the relative path from the main config to the module is the same in both environments, then you would be able to do For now, maybe a workaround can be to use env variables to specify different paths for the different envs? https://grafana.com/docs/alloy/latest/reference/stdlib/env/ |
Does it also work, if I'm calling In my scenario, I have |
yes it also works, fyi we defined the terminology as follows: Module: A unit of Alloy configuration, with its own set of independent configuration blocks and instantiated components. A single module may be represented by multiple files. Main configuration: The module which is directly loaded by So the main config is also a module and its module_path is the path that you give in the alloy run command |
Perfect! Did you also consider to add something like |
We didn't but that's a good idea. I will suggest it to the team and if they're fine with it I could add it as a follow up of the relative path PR |
This issue has not had any activity in the past 30 days, so the |
Still relevant |
Request
I would like to use https://grafana.com/docs/alloy/latest/reference/config-blocks/import.file/ without define a full qualified file path for filename.
Use case
Cross OS compatibility. I would like to use the same configuration under windows and linux. However this is not possible, because the location of the config files is different.
With load paths (as CLI flag), I can define a desired location for additional configurations files across multiple systems.
Similar to the PATH environment variable on UNIX systems for looking up binaries.
The text was updated successfully, but these errors were encountered: