Sidecar 1.0: custom runtime variables

There are a couple Sidecar runtime variables I can use in my configurations, e.g. ${sidecar.nodeName}. Now I have a couple of servers where the log files to be collected are in a different location, but otherwise the same. It would be very useful if I could create my own runtime variables in a sidecar.yml configuration on a specific server, so that I do not have to duplicate an entire log input just to change a subtle thing like a file path. However, I do not see a way of doing so.

This would greatly reduce duplication of configuration snippets. Is there some Sidecar configuration option that can be used for this that is not in the example sidecar.yml file?

1 Like

If it doesn’t exist yet, this is a great candidate for a feature request!

Would be nice if the text pasted into variables would also do the variable interpolation (tip: it doesn’t - although I’m currently basing my configuration on the fact it doesn’t :D)

Yeah, noticed the lack of further interpolation myself as well when migrating my configuration from the old Graylog 2.5.x format, where the node id and node name fields would be inside every log input definition. Luckily you can use these as top level fields as well and they get inherited.

Looks like there was already such a feature request, so I just replied there:

1 Like

Looks like there was already such a feature request, so I just replied there

Mooi werk! Tof van je :slight_smile:

Thanks for taking the time to look through the existing requests and issues before making a duplicate.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.