mdanner
(Martin Danner)
October 10, 2017, 9:19am
1
Is it possible to use an environment variable to specify part of the file path in the *beat.yml configuration?
You can see what I'm trying to do here. Is there a way to make it work?
output.logstash:
hosts: ["foobar.com:5044"]
ssl.certificate_authorities: ['${%PROGRAMFILES(X86)}\Metricbeat\pki\ca.crt']
ssl.certificate: '${%PROGRAMFILES(X86)}\Metricbeat\pki\metricbeat-client.crt'
ssl.key: '${%PROGRAMFILES(X86)}\Metricbeat\pki\metricbeat-client.key'
mdanner
(Martin Danner)
October 10, 2017, 9:28am
2
I spotted the error as soon as I posted this topic. The environment variables contain a % that shouldn't be there. This works just fine:
output.logstash:
hosts: ["foobar.com:5044"]
ssl.certificate_authorities: ['${PROGRAMFILES(X86)}\Metricbeat\pki\ca.crt']
ssl.certificate: '${PROGRAMFILES(X86)}\Metricbeat\pki\metricbeat-client.crt'
ssl.key: '${PROGRAMFILES(X86)}\Metricbeat\pki\metricbeat-client.key'
The ability to embed environment variables is a cool feature!
ruflin
(ruflin)
October 10, 2017, 11:17am
3
Glad you found the solution and thanks for posting it for others.
system
(system)
Closed
October 31, 2017, 9:19am
4
This topic was automatically closed after 21 days. New replies are no longer allowed.