From 5939213a7f26e12fc498198c3c48898939e9c2b6 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Wed, 25 Sep 2024 22:05:25 +0200 Subject: [PATCH] updated clickhouse state --- states/clickhouse/config.sls | 9 +++++++++ states/clickhouse/templates/prometheus.xml.j2 | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 states/clickhouse/templates/prometheus.xml.j2 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 + +