From 13ae3fd005fac5eae6bc7cb0611e32ee796b67ef Mon Sep 17 00:00:00 2001 From: tierno <alfonso.tiernosepulveda@telefonica.com> Date: Fri, 9 Oct 2020 13:19:56 +0000 Subject: [PATCH] parametrization of prometheus jinja2 template it allows activating/desactivating blocks of prometheus jobs by setting variables at begining Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com> --- .../helm-charts/eechart/prometheus-job-template.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/prometheus-job-template.j2 b/snmp_setcomm_ee_vnf/helm-charts/eechart/prometheus-job-template.j2 index f82adfc1..e1c0be1e 100644 --- a/snmp_setcomm_ee_vnf/helm-charts/eechart/prometheus-job-template.j2 +++ b/snmp_setcomm_ee_vnf/helm-charts/eechart/prometheus-job-template.j2 @@ -1,3 +1,7 @@ +{# change to 'true' or 'false' according to your requirements #} +{% set snmpexporter = true %} + +{% if snmpexporter %} - job_name: '{{ JOB_NAME }}' static_configs: - targets: @@ -12,4 +16,4 @@ target_label: instance - target_label: __address__ replacement: {{ EXPORTER_POD_IP }}:{{ EXPORTER_POD_PORT }} # The SNMP exporter's real hostname:port. - +{% endif %} -- GitLab