You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to perform any sort of validation of alloy config files like agent have.
They only way to perform any sort of validation is to either deploy config and check logs or try to run alloy locally with the config.
Proposal
Add a validate command to alloy. This command should:
Parse config and report any syntax errors.
Check if components exists and can be used with proper flags (stability and community components enabled).
Perform some sort of type checking of arguments.
The first two are pretty simple and already implemented in #3220.
The third point is most likely going to be pretty tricky. We cannot really reuse the runtime flow because this will have side effect, like expanding environment variables. Instead I think we want to perform type checking and some type inference e.g. we infer that sys.env("VARIABLE") returns a string. This will have some limitations and cannot catch all possible errors but we can work towards making this as robust a possible.
I prefer to split this work over several pr:s because I will need to experiment a lot on point 3 and we can get some value of the easy parts faster.
Other things to explore is how we can expose this for external use like fleet management
The text was updated successfully, but these errors were encountered:
Background
Currently there is no way to perform any sort of validation of alloy config files like agent have.
They only way to perform any sort of validation is to either deploy config and check logs or try to run alloy locally with the config.
Proposal
Add a validate command to alloy. This command should:
The first two are pretty simple and already implemented in #3220.
The third point is most likely going to be pretty tricky. We cannot really reuse the runtime flow because this will have side effect, like expanding environment variables. Instead I think we want to perform type checking and some type inference e.g. we infer that
sys.env("VARIABLE")
returns a string. This will have some limitations and cannot catch all possible errors but we can work towards making this as robust a possible.I prefer to split this work over several pr:s because I will need to experiment a lot on point 3 and we can get some value of the easy parts faster.
Other things to explore is how we can expose this for external use like fleet management
The text was updated successfully, but these errors were encountered: