Common Module - Telegraf Logic

This commit is contained in:
Mike Reeves
2018-11-20 14:32:18 -05:00
parent 43b18dee1d
commit 9c7bf9c995

View File

@@ -563,11 +563,14 @@
# # Read stats from one or more Elasticsearch servers or clusters
{% if grains['role'] == 'so-master' or grains['role'] == 'so-eval' %}
[[inputs.elasticsearch]]
# ## specify a list of one or more Elasticsearch servers
# # you can add username and password to your url to use basic authentication:
# # servers = ["http://user:pass@localhost:9200"]
servers = ["http://{{ MASTER }}:9200"]
{% endif %}
#
# ## Timeout for HTTP requests to the elastic search server(s)
# http_timeout = "5s"
@@ -604,11 +607,30 @@
# # Read metrics from one or more commands that can output to stdout
[[inputs.exec]]
# ## Commands array
{% if grains['role'] == 'so-master' %}
[[inputs.exec]]
commands = [
"/scripts/redis.sh"
]
data_format = "influx"
{% elseif grains['role'] == 'so-SENSOR' %}
[[inputs.exec]]
commands = [
"/scripts/stenoloss.sh"
]
data_format = "influx"
{% elseif grains['role'] == 'so-eval' %}
[[inputs.exec]]
commands = [
"/scripts/redis.sh",
"/scripts/stenoloss.sh"
]
data_format = "influx"
{% endif %}
#
# ## Timeout for each command to complete.
# timeout = "5s"
@@ -620,7 +642,7 @@
# ## 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
data_format = "influx"
# # Read metrics from fail2ban.