ajout template grafana et du fichier de diagnose de grafana

This commit is contained in:
2018-05-28 16:57:39 +02:00
parent 336b92183b
commit 224bab68c2
4 changed files with 508 additions and 12 deletions

View File

@ -3,12 +3,16 @@
<files>
<package>prometheus</package>
<file filelist='prometheus' name='/etc/prometheus/prometheus.yml' source='prometheus.yml' mkdir='True' rm='True'/>
<file filelist='grafana' name='/etc/grafana/grafana.ini' source='grafana.ini' mkdir='True' rm='True'/>
<service>prometheus</service>
<service_access service='prometheus'>
<port service_accesslist="saLemon">80</port>
<port service_accesslist="saLemon">443</port>
<port>9090</port>
<port>9100</port>
<port service_accesslist="prometheus">9090</port>
<port service_accesslist="prometheus">9100</port>
</service_access>
<service_access service='grafana-server'>
<port service_accesslist="grafana">3000</port>
</service_access>
</files>
<variables>
@ -18,6 +22,9 @@
</variable>
</family>
<family name='prometheus'>
<variable name='activer_grafana' type='oui/non' description="Activer le service grafana sur le serveur">
<value>oui</value>
</variable>
<variable name='prometheusJobName' type='string' description="Nom du job ajouté au label">
<value>prometheus</value>
</variable>
@ -33,7 +40,7 @@
<variable name='ajout_client_prometheus' type='oui/non' description="Ajouter un nouveau client à Prometheus">
<value>non</value>
</variable>
<variable name='url_nouveau_client_prometheus' type='string' description="url/IP du nouveau client" multi="True" mandatory='True'>
<variable name='nouveau_node_exporter' type='string' description="url/IP du nouveau node exporter" multi="True" mandatory='True'>
<value>client.prometheus.lan</value>
</variable>
<variable name='job_name_node' type='string' description="Nom du job pour les noeuds" mode='expert'>
@ -43,6 +50,23 @@
<value>/etc/prometheus/nodes</value>
</variable>
</family>
<family name="grafana">
<variable name='grafana_domain' type='string' description="Nom de Domaine ou IP pour accèder à l'interface Grafana" mandatory='True'>
<value>localhost</value>
</variable>
<variable name='grafana_session_max_lifetime' type='string' description="Durée avant déconnexion de l'interface Grafana (en seconde)">
<value>86400</value>
</variable>
<variable name='grafana_admin_passwd' type='string' description="Mot de passe admin pour la première connexion">
<value>admin</value>
</variable>
<variable name='grafana_sign_up' type='string' description="Activer l'enregistrement automatique">
<value>false</value>
</variable>
<variable name='grafana_auth_anonymous' type='string' description="Activer l'accès aux utilisateurs non enregistrés">
<value>false</value>
</variable>
</family>
</variables>
<constraints>
@ -50,14 +74,24 @@
<param>non</param>
<target type='variable'>activer_prometheus</target>
</condition>
<condition name='disabled_if_in' source='activer_firewall'>
<param>non</param>
<target type='variable'>activer_grafana</target>
</condition>
<condition name='disabled_if_in' source='activer_prometheus'>
<param>non</param>
<target type='family'>prometheus</target>
<target type='filelist'>prometheus</target>
<target type='variable'>activer_grafana</target>
</condition>
<condition name='disabled_if_in' source='activer_grafana'>
<param>non</param>
<target type='family'>grafana</target>
<target type='filelist'>grafana</target>
</condition>
<condition name='disabled_if_in' source='ajout_client_prometheus'>
<param>non</param>
<target type='variable'>url_nouveau_client_prometheus</target>
<target type='variable'>nouveau_node_exporter</target>
</condition>
</constraints>
<help>