From e430be1017b5a46e11b43bbb6bc97ebb7f398f67 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Fri, 2 Apr 2021 16:36:29 -0400 Subject: [PATCH 1/5] Enable Flux compatibility mode to prepare for eventual migration to 2.0 --- salt/influxdb/etc/influxdb.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/influxdb/etc/influxdb.conf b/salt/influxdb/etc/influxdb.conf index 86c1ccfe8..9d89ca774 100644 --- a/salt/influxdb/etc/influxdb.conf +++ b/salt/influxdb/etc/influxdb.conf @@ -233,7 +233,7 @@ # enabled = true # Determines whether the Flux query endpoint is enabled. - # flux-enabled = false + flux-enabled = true # The bind address used by the HTTP service. # bind-address = ":8086" From f7f95b6c541c6db3a5264f1094da7b604b3ff617 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Thu, 8 Apr 2021 11:22:54 -0400 Subject: [PATCH 2/5] Add model to sensoroni agent config --- salt/sensoroni/files/sensoroni.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/salt/sensoroni/files/sensoroni.json b/salt/sensoroni/files/sensoroni.json index df2990404..378d42373 100644 --- a/salt/sensoroni/files/sensoroni.json +++ b/salt/sensoroni/files/sensoroni.json @@ -1,9 +1,6 @@ {%- set URLBASE = salt['pillar.get']('global:url_base') %} -{%- if salt['pillar.get']('sensoroni:node_description') %} -{%- set DESCRIPTION = salt['pillar.get']('sensoroni:node_description') %} -{%- else %} -{%- set DESCRIPTION = salt['grains.get']('sosmodel', '') %} -{%- endif %} +{%- set DESCRIPTION = salt['pillar.get']('sensoroni:node_description', '') %} +{%- set MODEL = salt['grains.get']('sosmodel', '') %} {%- set ADDRESS = salt['pillar.get']('sensoroni:node_address') %} {%- set SENSORONIKEY = salt['pillar.get']('global:sensoronikey', '') %} {%- set CHECKININTERVALMS = salt['pillar.get']('sensoroni:node_checkin_interval_ms', 10000) %} @@ -21,6 +18,7 @@ "role": "{{ grains.role }}", "description": "{{ DESCRIPTION }}", "address": "{{ ADDRESS }}", + "model": "{{ MODEL }}", "pollIntervalMs": {{ CHECKININTERVALMS if CHECKININTERVALMS else 10000 }}, "serverUrl": "https://{{ URLBASE }}/sensoroniagents", "verifyCert": false, From c9feda116853bf91d5160c8205dc4602268c6afe Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Fri, 9 Apr 2021 08:48:29 -0400 Subject: [PATCH 3/5] Do not upgrade salt on ISO installs --- setup/so-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index b7acf7cb1..ba815e57f 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -2718,7 +2718,7 @@ update_sudoers() { update_packages() { if [ "$OS" = 'centos' ]; then yum repolist >> /dev/null - yum -y update >> "$setup_log" + yum -y update --exclude=salt* >> "$setup_log" else retry 50 10 "apt-get -y update" >> "$setup_log" 2>&1 || exit 1 retry 50 10 "apt-get -y upgrade" >> "$setup_log" 2>&1 || exit 1 From 5cb73ced36ef40f6683be14db1d5ec4391fd8328 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Fri, 9 Apr 2021 14:58:15 -0400 Subject: [PATCH 4/5] Add Influx module to SOC config --- salt/soc/files/soc/soc.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salt/soc/files/soc/soc.json b/salt/soc/files/soc/soc.json index 6e2850aca..1dcd46c63 100644 --- a/salt/soc/files/soc/soc.json +++ b/salt/soc/files/soc/soc.json @@ -53,6 +53,13 @@ "cacheMs": {{ ES_FIELDCAPS_CACHE }}, "verifyCert": false }, + "influxdb": { + "hostUrl": "https://{{ MANAGERIP }}:8086", + "token": "", + "org": "", + "bucket": "telegraf", + "verifyCert": false + }, "sostatus": { "refreshIntervalMs": 30000, "offlineThresholdMs": 900000 From 8facbcf18c16b432fdb2beef12cbfc023c8abead Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Fri, 9 Apr 2021 20:40:44 -0400 Subject: [PATCH 5/5] Do not set influxdb hostUrl if import node since import nodes don't run influxdb --- salt/soc/files/soc/soc.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/soc/files/soc/soc.json b/salt/soc/files/soc/soc.json index 1dcd46c63..6f1c3a6da 100644 --- a/salt/soc/files/soc/soc.json +++ b/salt/soc/files/soc/soc.json @@ -54,7 +54,11 @@ "verifyCert": false }, "influxdb": { +{%- if grains['role'] in ['so-import'] %} + "hostUrl": "", +{%- else %} "hostUrl": "https://{{ MANAGERIP }}:8086", +{%- endif %} "token": "", "org": "", "bucket": "telegraf",