Alloy multiple alloy config files

Is it possible to use multiple alloy config files. Just like this is possible with telegraf (/etc/telegraf/telegraf.d) Now I have to put everything in /etc/alloy/config.alloy

You can define your own custom configuration file location (you are not forced to use the default /etc/alloy/config.alloy

If you want to use multiple configuration files, you can define a directory path instead of a file path and Alloy will find all *.alloy files. There are some limitations and requirements. It’s documented here: The run command | Grafana Alloy documentation

Thank you very much, we will test this. Does anyone have an config example of: define a directory path instead of a file path

It should just be something like this (assuming no flags are used):

alloy run /home/username/alloyconfig/

Where /home/username/alloyconfig/ contains one or more .alloy files. The content of the .alloy files must meet the requirements… “component names must be unique across all Alloy configuration files, and configuration blocks must not be repeated.”