Beats environment variable not working

Hello,

I'm using Auditbeat 7.8.0, trying to pass value to configuration using environment variables under the processors - add_host_metadata.

I have exported the variable in my shell using the command export CITY_NAME="New York" and the Auditbeat config looks like below.

processors:
  - add_host_metadata:
      cache.ttl: 5m
      geo:
        city_name: '$CITY_NAME'

But the output data generated is as below.

"geo" => {
                  "city_name" => "$CITY_NAME"
     }

Could you please help me, to find if there is any changes to be made in order to get the proper output ?

Thanks in Advance

hi @mozam, have you tried using:

city_name: '${CITY_NAME}'

instead, per https://www.elastic.co/guide/en/beats/auditbeat/current/using-environ-vars.html?

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