From a106913d1a1cbba2889d2d5af9055802dc4a780e Mon Sep 17 00:00:00 2001 From: Doug Burks Date: Wed, 14 Oct 2020 09:51:59 -0400 Subject: [PATCH] Heavy node filebeat needs extra_hosts for the heavy node itself #1521 --- salt/filebeat/init.sls | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/filebeat/init.sls b/salt/filebeat/init.sls index 28c04d01a..6bbcea8b4 100644 --- a/salt/filebeat/init.sls +++ b/salt/filebeat/init.sls @@ -18,6 +18,9 @@ {% set VERSION = salt['pillar.get']('global:soversion', 'HH1.2.2') %} {% set IMAGEREPO = salt['pillar.get']('global:imagerepo') %} +{% set LOCALHOSTNAME = salt['grains.get']('host') %} +{% set MAININT = salt['pillar.get']('host:mainint') %} +{% set LOCALHOSTIP = salt['grains.get']('ip_interfaces').get(MAININT)[0] %} {% set MANAGER = salt['grains.get']('master') %} {% set MANAGERIP = salt['pillar.get']('global:managerip', '') %} {% set FEATURES = salt['pillar.get']('elastic:features', False) %} @@ -66,7 +69,7 @@ so-filebeat: - image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-filebeat:{{ VERSION }}{{ FEATURES }} - hostname: so-filebeat - user: root - - extra_hosts: {{ MANAGER }}:{{ MANAGERIP }} + - extra_hosts: {{ MANAGER }}:{{ MANAGERIP }},{{ LOCALHOSTNAME }}:{{ LOCALHOSTIP }} - binds: - /nsm:/nsm:ro - /opt/so/log/filebeat:/usr/share/filebeat/logs:rw