[fix] Set timeout for scripts (15s, 3x default 5s)

This commit is contained in:
William Wernert
2021-01-22 12:15:29 -05:00
parent 537f7529f8
commit f1781b1fde

View File

@@ -674,6 +674,8 @@
"/scripts/influxdbsize.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'] %} {% elif grains['role'] in ['so-sensor', 'so-heavynode'] %}
[[inputs.exec]] [[inputs.exec]]
commands = [ commands = [
@@ -685,6 +687,7 @@
"/scripts/oldpcap.sh" "/scripts/oldpcap.sh"
] ]
data_format = "influx" data_format = "influx"
timeout = "15s"
{% elif grains['role'] == 'so-standalone' %} {% elif grains['role'] == 'so-standalone' %}
[[inputs.exec]] [[inputs.exec]]
commands = [ commands = [
@@ -698,6 +701,7 @@
"/scripts/oldpcap.sh" "/scripts/oldpcap.sh"
] ]
data_format = "influx" data_format = "influx"
timeout = "15s"
{% elif grains['role'] == 'so-eval' %} {% elif grains['role'] == 'so-eval' %}
[[inputs.exec]] [[inputs.exec]]
commands = [ commands = [
@@ -711,6 +715,7 @@
"/scripts/influxdbsize.sh" "/scripts/influxdbsize.sh"
] ]
data_format = "influx" data_format = "influx"
timeout = "15s"
{% elif grains['role'] == 'so-helix' %} {% elif grains['role'] == 'so-helix' %}
[[inputs.exec]] [[inputs.exec]]
commands = [ commands = [
@@ -723,19 +728,16 @@
"/scripts/helixeps.sh" "/scripts/helixeps.sh"
] ]
data_format = "influx" data_format = "influx"
timeout = "15s"
{% endif %} {% endif %}
# ## measurement name suffix (for separating different commands)
# ## Timeout for each command to complete. # name_suffix = "_mycollector"
# timeout = "5s"
# ## Data format to consume.
# ## measurement name suffix (for separating different commands) ## Each data format has its own unique set of configuration options, read
# name_suffix = "_mycollector" ## more about them here:
# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
# ## 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