diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index fd614a68b..e18205ad1 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -109,10 +109,12 @@ fields_as_jsonb = true # Every metric table is a daily time-range partitioned parent managed by # pg_partman. Retention drops old partitions instead of row-by-row DELETEs. + {% raw %} create_templates = [ '''CREATE TABLE {{ .table }} ({{ .columns }}) PARTITION BY RANGE ("time")''', '''SELECT partman.create_parent(p_parent_table := {{ .table|quoteLiteral }}, p_control := 'time', p_type := 'range', p_interval := '1 day', p_premake := 3)''' ] + {% endraw %} {%- endif %} ###############################################################################