Use environmental variables in filebeat configuration?

Hi,

I would like to add some fields to some log inputs.
Lets say I have an environmental variable path1=my_first_instance

Is it possible to configure something like this in the input configuration?

fields:
  instance: ${path1}

If so, will it be updated on the fly? Meaning, if I change the environmental variable, will the field value change immediately without restarting filebeat?

You can use environment variables in your configuration. See more: https://www.elastic.co/guide/en/beats/filebeat/current/using-environ-vars.html

If the value of the environment variable is changed, Filebeat needs to be restarted.

thanks

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