Escape Go-template placeholders from Jinja in telegraf.conf

This commit is contained in:
Mike Reeves
2026-04-17 15:04:37 -04:00
parent b3fbd5c7a4
commit af9330a9dd
+2
View File
@@ -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 %}
###############################################################################