diff --git a/states/clickhouse/config.sls b/states/clickhouse/config.sls index cffae4f..0e5e5b0 100644 --- a/states/clickhouse/config.sls +++ b/states/clickhouse/config.sls @@ -49,3 +49,12 @@ clickhouse-config-file-tls: - group: clickhouse - mode: 600 - template: jinja + +clickhouse-config-file-prometheus: + file.managed: + - name: /etc/clickhouse-server/config.d/prometheus.xml + - source: salt://clickhouse/templates/prometheus.xml.j2 + - user: clickhouse + - group: clickhouse + - mode: 600 + - template: jinja diff --git a/states/clickhouse/templates/prometheus.xml.j2 b/states/clickhouse/templates/prometheus.xml.j2 new file mode 100644 index 0000000..0b8eed4 --- /dev/null +++ b/states/clickhouse/templates/prometheus.xml.j2 @@ -0,0 +1,10 @@ +{%- from "clickhouse/map.jinja" import clickhouse with context %} + + + /metrics + 7555 + true + true + true + +