Replies: 1 comment
-
|
I found this: Is there a list of variables for template syntax? But the central question of using the template syntax (as opposed to env var syntax) in configuration files still stands. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Early on in my use of vector I wrote a toml configuration using "{{ host }}" in my sink definitions to specify per-host log destinations. Here is one of several sinks I have:
Now despite quite a bit of searching I cannot find the documentation that describes "{{ host }}" as a mechanism. Neither https://vector.dev/docs/reference/configuration/ nor https://vector.dev/docs/reference/configuration/template-syntax/ mention it. I must have read it somewhere though, and it does work.
Interestingly, I asked Claude to read the docs and it thinks that "the {{ }} syntax is exclusively for referencing event data fields at runtime, not arbitrary config variables." This is clearly not strictly true because the above config is working.
I am curious what the dev team's take is.
I would love to see some documentation describing the complete list of "global" variables (or whatever you call them; I mean the variables that aren't event fields) that are available in the template syntax. For example, I see
"{{application_id}}"in places but I can't find any description of what it is.I am also interested to know if using the template syntax in configs is recommended, given that the documentation is confusing in this department.
I'd be happy to file an issues describing more specifically where I think the docs fall short. The team has been fantastically receptive to those issues in the past and I appreciate it. I didn't do so in this case because I don't want it to seem like I'm using docs issues just to ask for help.
Beta Was this translation helpful? Give feedback.
All reactions