Browse Source

Ajout de la possibilité de configurer la rétention des données

2.6.2/master
Philippe Caseiro 1 year ago
parent
commit
61155f10f4
2 changed files with 6 additions and 1 deletions
  1. 5
    1
      dicos/70_prometheus.xml
  2. 1
    0
      tmpl/prometheus.defaults

+ 5
- 1
dicos/70_prometheus.xml View File

@@ -1,7 +1,8 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <creole>
3 3
     <files>
4
-        <file filelist='prometheus'   name='/etc/prometheus/prometheus.yml'          mkdir='True' rm='True'/>
4
+		<file filelist='prometheus'   name='/etc/default/prometheus' source='prometheus.defaults'  mkdir='True' rm='True'/>
5
+        <file filelist='prometheus'   name='/etc/prometheus/prometheus.yml'          mkdir='Trues' rm='True'/>
5 6
         <file filelist='alertmanager' name='/etc/prometheus/alertmanager.yml'        mkdir='True' rm='True'/>
6 7
 		<file filelist='alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/>
7 8
         <file filelist='grafana'      name='/etc/grafana/grafana.ini'                mkdir='True' rm='True'/>
@@ -30,6 +31,9 @@
30 31
             <variable name='activerAlertmanager' type='oui/non' description="Activer le service d'alertes">
31 32
                 <value>oui</value>
32 33
             </variable>
34
+			<variable name='promStorageRetention' type='number' description='Durée de rétention des métriques (en heures)'>
35
+				<value>24</value>
36
+			</variable>
33 37
             <variable name='prometheusJobName' type='string' description="Nom du job ajouté au label">
34 38
                 <value>prometheus</value>
35 39
             </variable>

+ 1
- 0
tmpl/prometheus.defaults View File

@@ -0,0 +1 @@
1
+PROMETHEUS_OPTS='--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data --storage.local.retention=%%{promStorageRetention}h"

Loading…
Cancel
Save