From a7600f7f430d90610f53b0924a2974eb190b6880 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 15 Dec 2021 17:31:39 -0500 Subject: [PATCH] update scripts to use their own ip --- salt/common/tools/sbin/so-logstash-events | 3 ++- salt/common/tools/sbin/so-logstash-pipeline-stats | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/so-logstash-events b/salt/common/tools/sbin/so-logstash-events index 817cafb72..8ab74862b 100755 --- a/salt/common/tools/sbin/so-logstash-events +++ b/salt/common/tools/sbin/so-logstash-events @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{% set MAININT = salt['pillar.get']('host:mainint') -%} +{% set NODEIP = salt['grains.get']('ip_interfaces').get(MAININT)[0] -%} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-logstash-pipeline-stats b/salt/common/tools/sbin/so-logstash-pipeline-stats index b82a125d2..642269267 100755 --- a/salt/common/tools/sbin/so-logstash-pipeline-stats +++ b/salt/common/tools/sbin/so-logstash-pipeline-stats @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{% set MAININT = salt['pillar.get']('host:mainint') -%} +{% set NODEIP = salt['grains.get']('ip_interfaces').get(MAININT)[0] -%} . /usr/sbin/so-common