Using environment variables on filebeat config file


#1

I'd like to tag the logs coming from filebeat with the content of an environment variable, but I need to remove dashes from the environment variable. I've tried this

shipper:
  tags: ["agent", ${APPLICATION_NAME//-/}]

but even though it works in bash, it doesn't work in filebeat.

Can this be done?


(Carlos PĂ©rez Aradros) #2

Hi @fiunchinho,

Beats don't use the same semantics as Bash. We don't support these kind of transformations to env variables, I would recommend setting the transformed env variable outside Filebeat, before launching it


#3

Ok, thank you


(system) #4

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