From aa47fba5e3aeccb1384013e8e895cf0ee1596dfd Mon Sep 17 00:00:00 2001 From: Yuan Ling <32370701+lingy1028@users.noreply.github.com> Date: Wed, 19 May 2021 04:42:57 -0400 Subject: [PATCH] fix: moved indexes from config yaml to args (#77) --- deploy/sc4snmp/ftr/scheduler-config.yaml | 5 ----- deploy/sc4snmp/ftr/traps-server-config.yaml | 2 -- .../internal/scheduler-deployment.yaml | 3 +++ deploy/sc4snmp/internal/traps-deployment.yaml | 21 +++++++++++-------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/deploy/sc4snmp/ftr/scheduler-config.yaml b/deploy/sc4snmp/ftr/scheduler-config.yaml index b8a576196..1cd02b141 100644 --- a/deploy/sc4snmp/ftr/scheduler-config.yaml +++ b/deploy/sc4snmp/ftr/scheduler-config.yaml @@ -51,11 +51,6 @@ data: - ['IF-MIB','ifOutErrors'] - ['IF-MIB','ifInDiscards'] - ['IF-MIB','ifOutDiscards'] - splunk: - index: - event: "##EVENTS_INDEX##" - meta: "##META_INDEX##" - metric: "##METRICS_INDEX##" mongo: database: "snmp_poller" collection: "walked_hosts" diff --git a/deploy/sc4snmp/ftr/traps-server-config.yaml b/deploy/sc4snmp/ftr/traps-server-config.yaml index 9c238a6a4..9a45528d2 100644 --- a/deploy/sc4snmp/ftr/traps-server-config.yaml +++ b/deploy/sc4snmp/ftr/traps-server-config.yaml @@ -33,5 +33,3 @@ data: securityEngineId: 8000000903bc16f5802780 thread-pool: max-suggested-working-threads: 10 - splunk: - index: "##EVENTS_INDEX##" diff --git a/deploy/sc4snmp/internal/scheduler-deployment.yaml b/deploy/sc4snmp/internal/scheduler-deployment.yaml index 0b0f4140c..dee82deb4 100644 --- a/deploy/sc4snmp/internal/scheduler-deployment.yaml +++ b/deploy/sc4snmp/internal/scheduler-deployment.yaml @@ -23,6 +23,9 @@ spec: "--log=WARN", "--config=/work/config/config.yaml", "--inventory=/work/inventory/inventory.csv", + "--event_index=##EVENTS_INDEX##", + "--metric_index=##METRICS_INDEX##", + "--meta_index=##META_INDEX##", ] env: - name: MONGO_SERVICE_SERVICE_HOST diff --git a/deploy/sc4snmp/internal/traps-deployment.yaml b/deploy/sc4snmp/internal/traps-deployment.yaml index d92a9b922..3ea01161c 100644 --- a/deploy/sc4snmp/internal/traps-deployment.yaml +++ b/deploy/sc4snmp/internal/traps-deployment.yaml @@ -18,7 +18,12 @@ spec: - name: traps image: ghcr.io/splunk/splunk-connect-for-snmp-traps:1 imagePullPolicy: Always - args: ["--loglevel=WARN", "--config=/work/config/config.yaml"] + args: + [ + "--loglevel=WARN", + "--config=/work/config/config.yaml", + "--index=##EVENTS_INDEX##", + ] ports: - containerPort: 2162 env: @@ -46,11 +51,9 @@ spec: mountPath: "/work/config" readOnly: true volumes: - - name: config - configMap: - name: sc4snmp-trap - items: - - key: "config.yaml" - path: "config.yaml" - - + - name: config + configMap: + name: sc4snmp-trap + items: + - key: "config.yaml" + path: "config.yaml"