From f1781b1fde6104e38bcc322079b56738186a40d5 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Fri, 22 Jan 2021 12:15:29 -0500 Subject: [PATCH] [fix] Set timeout for scripts (15s, 3x default 5s) --- salt/telegraf/etc/telegraf.conf | 80 +++++++++++++++++---------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index 2233b5c25..3d89628e4 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -670,47 +670,52 @@ {% if grains['role'] in ['so-manager', 'so-managersearch'] %} [[inputs.exec]] commands = [ - "/scripts/redis.sh", - "/scripts/influxdbsize.sh" + "/scripts/redis.sh", + "/scripts/influxdbsize.sh" ] - data_format = "influx" + data_format = "influx" + ## Timeout for each command to complete. + timeout = "15s" {% elif grains['role'] in ['so-sensor', 'so-heavynode'] %} [[inputs.exec]] commands = [ - "/scripts/stenoloss.sh", - "/scripts/suriloss.sh", - "/scripts/checkfiles.sh", - "/scripts/zeekloss.sh", - "/scripts/zeekcaptureloss.sh", - "/scripts/oldpcap.sh" + "/scripts/stenoloss.sh", + "/scripts/suriloss.sh", + "/scripts/checkfiles.sh", + "/scripts/zeekloss.sh", + "/scripts/zeekcaptureloss.sh", + "/scripts/oldpcap.sh" ] - data_format = "influx" + data_format = "influx" + timeout = "15s" {% elif grains['role'] == 'so-standalone' %} [[inputs.exec]] commands = [ - "/scripts/redis.sh", - "/scripts/influxdbsize.sh", - "/scripts/stenoloss.sh", - "/scripts/suriloss.sh", - "/scripts/checkfiles.sh", - "/scripts/zeekloss.sh", - "/scripts/zeekcaptureloss.sh", - "/scripts/oldpcap.sh" + "/scripts/redis.sh", + "/scripts/influxdbsize.sh", + "/scripts/stenoloss.sh", + "/scripts/suriloss.sh", + "/scripts/checkfiles.sh", + "/scripts/zeekloss.sh", + "/scripts/zeekcaptureloss.sh", + "/scripts/oldpcap.sh" ] - data_format = "influx" + data_format = "influx" + timeout = "15s" {% elif grains['role'] == 'so-eval' %} [[inputs.exec]] commands = [ - "/scripts/redis.sh", - "/scripts/stenoloss.sh", - "/scripts/suriloss.sh", - "/scripts/checkfiles.sh", - "/scripts/zeekloss.sh", - "/scripts/zeekcaptureloss.sh", - "/scripts/oldpcap.sh", - "/scripts/influxdbsize.sh" + "/scripts/redis.sh", + "/scripts/stenoloss.sh", + "/scripts/suriloss.sh", + "/scripts/checkfiles.sh", + "/scripts/zeekloss.sh", + "/scripts/zeekcaptureloss.sh", + "/scripts/oldpcap.sh", + "/scripts/influxdbsize.sh" ] - data_format = "influx" + data_format = "influx" + timeout = "15s" {% elif grains['role'] == 'so-helix' %} [[inputs.exec]] commands = [ @@ -723,19 +728,16 @@ "/scripts/helixeps.sh" ] data_format = "influx" + timeout = "15s" {% endif %} -# -# ## Timeout for each command to complete. -# timeout = "5s" -# -# ## measurement name suffix (for separating different commands) -# name_suffix = "_mycollector" -# -# ## Data format to consume. -# ## Each data format has its own unique set of configuration options, read -# ## more about them here: -# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md + ## measurement name suffix (for separating different commands) + # name_suffix = "_mycollector" + + ## Data format to consume. + ## Each data format has its own unique set of configuration options, read + ## more about them here: + ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md