Browse Source

Ajout d'un fichier de provisioning des datasources par défaut

William Petit 2 months ago
parent
commit
1a2f7172d9
2 changed files with 12 additions and 0 deletions
  1. 1
    0
      dicos/70_prometheus.xml
  2. 11
    0
      tmpl/grafana-datasources.yml

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

@@ -8,6 +8,7 @@
8 8
         <file filelist='prometheus-alertmanager' name='/etc/prometheus/rules.d/predict-rules.yml' mkdir='True' rm='True'/>
9 9
         <file filelist='grafana'      name='/etc/grafana/grafana.ini'                mkdir='True' rm='True'/>
10 10
         <file filelist='grafana'      name='/etc/grafana/provisioning/dashboards/eole.yml' source='grafana-dashboards.yml'     mkdir='True' rm='True'/>
11
+        <file filelist='grafana'      name='/etc/grafana/provisioning/datasources/eole.yml' source='grafana-datasources.yml'     mkdir='True' rm='True'/>
11 12
 
12 13
         <service>prometheus</service>
13 14
         <service>prometheus-alertmanager</service>

+ 11
- 0
tmpl/grafana-datasources.yml View File

@@ -0,0 +1,11 @@
1
+apiVersion: 1
2
+
3
+datasources:
4
+- name: Prometheus
5
+  type: prometheus
6
+  access: direct
7
+  orgId: 1
8
+  url: http://%%adresse_ip_eth0:9090
9
+  isDefault: true
10
+  version: 1
11
+  editable: false