Telegraf Module - Actually sync the config

This commit is contained in:
Mike Reeves
2018-11-16 14:31:12 -05:00
parent 64beb29149
commit 7d7f0bcd56
2 changed files with 11 additions and 2 deletions

View File

@@ -141,6 +141,14 @@ tgrafetcdir:
- name: /opt/so/conf/telegraf/etc
- makedirs: True
tgrafconf:
file.managed:
- name: /opt/so/conf/telegraf/telegraf.conf
- user: 939
- group: 939
- template: jinja
- source: salt://common/telegraf/etc/telegraf.conf
so-telegraf:
docker_container.running:
- image: soshybridhunter/so-telegraf:HH1.0.4

View File

@@ -12,7 +12,7 @@
# Environment variables can be used anywhere in this config file, simply prepend
# them with $. For strings the variable must be within quotes (ie, "$STR_VAR"),
# for numbers and booleans they should be plain (ie, $INT_VAR, $BOOL_VAR)
{%- set MASTER = grains['master'] %}
# Global tags can be specified here in key="value" format.
[global_tags]
@@ -90,7 +90,8 @@
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
# urls = ["http://127.0.0.1:8086"]
urls = ["http://{{ MASTER }}:8086"]
## The target database for metrics; will be created as needed.
# database = "telegraf"