Eolisation de Prometheus

70_prometheus.xml 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <creole>
  3. <files>
  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='True' rm='True'/>
  6. <file filelist='prometheus-alertmanager' name='/etc/prometheus/alertmanager.yml' mkdir='True' rm='True'/>
  7. <file filelist='prometheus-alertmanager' name='/etc/prometheus/rules.d/alert-rules.yml' mkdir='True' rm='True'/>
  8. <file filelist='prometheus-alertmanager' name='/etc/prometheus/rules.d/predict-rules.yml' mkdir='True' rm='True'/>
  9. <file filelist='grafana' name='/etc/grafana/grafana.ini' mkdir='True' rm='True'/>
  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'/>
  12. <file filelist='grafana' name='/var/lib/grafana/dashboards/eole.json' source='grafana-node-dashboard.json' mkdir='True' rm='True'/>
  13. <service>prometheus</service>
  14. <service>prometheus-alertmanager</service>
  15. <service>grafana-server</service>
  16. <service_access service='prometheus'>
  17. <port service_accesslist="prometheus">9090</port>
  18. <port service_accesslist="prometheus-alertmanager">9093</port>
  19. </service_access>
  20. <service_access service='grafana-server'>
  21. <port service_accesslist="grafana">3000</port>
  22. </service_access>
  23. </files>
  24. <variables>
  25. <family name='services'>
  26. <variable name='activer_prometheus' type='oui/non' description="Activer le service prometheus sur le serveur">
  27. <value>oui</value>
  28. </variable>
  29. </family>
  30. <family name='prometheus'>
  31. <variable name='activer_grafana' type='oui/non' description="Activer le service grafana sur le serveur">
  32. <value>oui</value>
  33. </variable>
  34. <variable name='activerAlertmanager' type='oui/non' description="Activer le service d'alertes">
  35. <value>oui</value>
  36. </variable>
  37. <variable name='promStorageRetention' type='number' description='Durée de rétention des métriques (en heures)'>
  38. <value>24</value>
  39. </variable>
  40. <variable name='prometheusJobName' type='string' description="Nom du job ajouté au label">
  41. <value>prometheus</value>
  42. </variable>
  43. <variable name='prometheusScrapeInterval' type='string' description="Intervalle de récupération des données sur les différents noeuds">
  44. <value>15s</value>
  45. </variable>
  46. <variable name='prometheusEvaluationInterval' type='string' description="Intervalle entre deux évaluations de règles">
  47. <value>30s</value>
  48. </variable>
  49. <variable name='prometheusScrapeTimeout' type='string' description="Temps d'attente avant que la récupération de données échoue">
  50. <value>10s</value>
  51. </variable>
  52. <variable name='job_name_node' type='string' description="Nom du job pour les noeuds" mode='expert'>
  53. <value>node</value>
  54. </variable>
  55. <variable name='job_file_config' type='string' description="Emplacement des fichiers de configuration des noeuds" auto_freeze='True' mode='expert' mandatory='True'>
  56. <value>/etc/prometheus/nodes</value>
  57. </variable>
  58. <variable name='addTargetPrometheus' type='oui/non' description="Ajouter des cibles statiques à Prometheus">
  59. <value>non</value>
  60. </variable>
  61. <!-- Job standard -->
  62. <variable name='prTarg' type='string' description='Nom de la cible prometheus' multi='True'/>
  63. <variable name='prTargIP' type='string' description="Adresse IP ou nom de domaine de la cible prometheus"/>
  64. <variable name='prTargSonde' type='string' description="Sonde a utiliser pour ce client">
  65. <value>Node Exporter</value>
  66. </variable>
  67. </family>
  68. <family name='Jobs prometheus'>
  69. <variable name='promJobs' type='string' description="Nom du job prometheus" multi='True'/>
  70. <variable name='honorLabels' type='oui/non' description='Garder les labels en cas de conflit' mode='expert'>
  71. <value>oui</value>
  72. </variable>
  73. <variable name='scrpInterval' type='number' description="Interval d'intérogation de la sonde (en secondes)">
  74. <value>15</value>
  75. </variable>
  76. <variable name='scrpTimeout' type='number' description="Délais d'attente maximum lors de l'interrogation d'une sonde">
  77. <value>10</value>
  78. </variable>
  79. <variable name='scrpScheme' type='string' description="Protocole à utiliser pour l'interrogation de la sonde">
  80. <value>http</value>
  81. </variable>
  82. <variable name='scrpMetricPath' type='string' description="Chemin d'accès de la ressource">
  83. <value>/metrics</value>
  84. </variable>
  85. <variable name='addPrOpenTarg' type='oui/non' description="Ajouter des cibles statiques pour les jobs personnalisé">
  86. <value>non</value>
  87. </variable>
  88. <!-- Job libre -->
  89. <variable name='prOpenTarg' type='string' description='Nom de la cible personnalisé prometheus' multi='True'/>
  90. <variable name='prOpenTargJob' type='string' description='Nom du job de rattachement de la cible'/>
  91. <variable name='prOpenTargIP' type='string' description="Adresse IP ou nom de domaine de la cible"/>
  92. <variable name='prOpenTargPort' type='number' description="Port d'écoute de la sonde"/>
  93. </family>
  94. <family name="grafana">
  95. <variable name='grafana_domain' type='string' description="Nom de Domaine ou IP pour accèder à l'interface Grafana" mandatory='True'>
  96. <value>localhost</value>
  97. </variable>
  98. <variable name='grafana_session_max_lifetime' type='string' description="Durée avant déconnexion de l'interface Grafana (en seconde)">
  99. <value>86400</value>
  100. </variable>
  101. <variable name='grafana_admin_passwd' type='string' description="Mot de passe admin pour la première connexion">
  102. <value>admin</value>
  103. </variable>
  104. <variable name='grafana_sign_up' type='string' description="Activer l'enregistrement automatique">
  105. <value>false</value>
  106. </variable>
  107. <variable name='grafana_auth_anonymous' type='string' description="Activer l'accès aux utilisateurs non enregistrés">
  108. <value>false</value>
  109. </variable>
  110. <variable name='grafanaRootURL' type='string' description='Url publique de grafana (avec http:// ou https://)' mode='expert'/>
  111. </family>
  112. <family name="alertes prometheus">
  113. <variable name='alSMTPUseSys' type='oui/non' description="Utiliser la passerelle SMTP du système ?">
  114. <value>non</value>
  115. </variable>
  116. <variable name='alSMTPHost' type='string' description="Adresse du serveur SMTP pour l'envois des alertes"/>
  117. <variable name='alSMTPPort' type='string' description="Port d'écoute du serveur SMTP pour l'envois des alertes"/>
  118. <variable name='alFrom' type='string' description="Adresse d'origine des emails d'alerte"/>
  119. <variable name='alSMTPTLS' type='oui/non' description="Utiliser STARTTLS">
  120. <value>non</value>
  121. </variable>
  122. <variable name='alSMTPAuth' type='oui/non' description="Authentification requise sur le serveur SMTP ?">
  123. <value>non</value>
  124. </variable>
  125. <variable name='alSMTPUser' type='string' description="Utilisateur SMTP"/>
  126. <variable name='alSMTPPass' type='string' description="Mot de passe"/>
  127. <variable name='alReceiver' type='string' description="Nom du destinataire" multi='True'/>
  128. <variable name='alReceiverEmail' type='string' description="Adresse email du destinataire"/>
  129. <variable name='alDefaultReceiver' type='string' description='Nom du destinataire par défaut'/>
  130. <variable name='alRoute' type='string' description="Nom de la rêgle de distribution des alertes" multi="True"/>
  131. <variable name='alRouteMatchSource' type='string' description='Source de correspondance'/>
  132. <variable name='alRouteMatchValue' type='string' description='Valeur attendue'/>
  133. <variable name='alRouteMatchReceiver' type='string' description="Nom du destinataire de l'alerte"/>
  134. <variable name='alRouteRegxp' type='string' description="Rêgle de distribution des alertes" multi="True"/>
  135. <variable name='alRouteMatchRegExpSource' type='string' description='Source de correspondance'/>
  136. <variable name='alRouteMatchRegExp' type='string' description='Expression régulière'/>
  137. <variable name='alRouteMatchRegxpRecv' type='string' description="Nom du destinataire de l'alerte (regxp)"/>
  138. <variable name='alSubRoute' type='string' description="Nom de la rêgle maitresse" multi='True'/>
  139. <variable name='alSubRouteMatchSource' type='string' description='Source de correspondance'/>
  140. <variable name='alSubRouteMatchValue' type='string' description='Valeur attendue'/>
  141. <variable name='alSubRouteMatchReceiver' type='string' description="Nom du destinataire de l'alerte"/>
  142. </family>
  143. <separators>
  144. <separator name='activer_grafana'>Services complèmentairse</separator>
  145. <separator name='prometheusJobName'>Configuration du serveur Prometheus</separator>
  146. <separator name='job_name_node'>Configuration des jobs standards</separator>
  147. <separator name='alSMTPHost'>Configuration SMTP pour l'envois des alertes</separator>
  148. <separator name='alReceiver'>Destinatires</separator>
  149. <separator name='alRoute'>Rêgles de distribution simples</separator>
  150. <separator name='alRouteRegxp'>Rêgles de distribution regexp</separator>
  151. <separator name='alSubRoute'>Sous-rêgles de distribution</separator>
  152. </separators>
  153. </variables>
  154. <constraints>
  155. <group master='alReceiver'>
  156. <slave>alReceiverEmail</slave>
  157. </group>
  158. <group master='promJobs'>
  159. <slave>scrpInterval</slave>
  160. <slave>scrpTimeout</slave>
  161. <slave>honorLabels</slave>
  162. <slave>scrpScheme</slave>
  163. <slave>scrpMetricPath</slave>
  164. </group>
  165. <group master='alRoute'>
  166. <slave>alRouteMatchSource</slave>
  167. <slave>alRouteMatchValue</slave>
  168. <slave>alRouteMatchReceiver</slave>
  169. </group>
  170. <group master='alRouteRegxp'>
  171. <slave>alRouteMatchRegExpSource</slave>
  172. <slave>alRouteMatchRegExp</slave>
  173. <slave>alRouteMatchRegxpRecv</slave>
  174. </group>
  175. <group master='alSubRoute'>
  176. <slave>alSubRouteMatchSource</slave>
  177. <slave>alSubRouteMatchValue</slave>
  178. <slave>alSubRouteMatchReceiver</slave>
  179. </group>
  180. <group master='prTarg'>
  181. <slave>prTargIP</slave>
  182. <slave>prTargSonde</slave>
  183. </group>
  184. <group master='prOpenTarg'>
  185. <slave>prOpenTargIP</slave>
  186. <slave>prOpenTargPort</slave>
  187. <slave>prOpenTargJob</slave>
  188. </group>
  189. <check name='valid_enum' target='prTargSonde'>
  190. <param>['Node Exporter']</param>
  191. </check>
  192. <check name='valid_enum' target='scrpScheme'>
  193. <param>['http','https']</param>
  194. </check>
  195. <check name='valid_enum' target='alRouteMatchSource'>
  196. <param>['','service','severity']</param>
  197. </check>
  198. <check name='valid_enum' target='alRouteMatchRegExpSource'>
  199. <param>['','service','severity']</param>
  200. </check>
  201. <check name='valid_enum' target='alSubRouteMatchSource'>
  202. <param>['','service','severity']</param>
  203. </check>
  204. <condition name='disabled_if_in' source='alSMTPUseSys'>
  205. <param>oui</param>
  206. <target type='variable'>alSMTPUser</target>
  207. <target type='variable'>alSMTPPass</target>
  208. <target type='variable'>alSMTPPort</target>
  209. <target type='variable'>alSMTPTLS</target>
  210. <target type='variable'>alSMTPHost</target>
  211. <target type='variable'>alSMTPAuth</target>
  212. </condition>
  213. <condition name='disabled_if_in' source='alSMTPAuth'>
  214. <param>non</param>
  215. <target type='variable'>alSMTPUser</target>
  216. <target type='variable'>alSMTPPass</target>
  217. </condition>
  218. <condition name='disabled_if_in' source='activer_prometheus'>
  219. <param>non</param>
  220. <target type='family'>prometheus</target>
  221. <target type='family'>alertes prometheus</target>
  222. <target type='filelist'>prometheus</target>
  223. <target type='variable'>activer_grafana</target>
  224. </condition>
  225. <condition name='disabled_if_in' source='activer_grafana'>
  226. <param>non</param>
  227. <target type='family'>grafana</target>
  228. <target type='filelist'>grafana</target>
  229. </condition>
  230. <condition name='disabled_if_in' source='activerAlertmanager'>
  231. <param>non</param>
  232. <target type='family'>alertes prometheus</target>
  233. <target type='filelist'>prometheus-alertmanager</target>
  234. <target type='service_accesslist'>prometheus-alertmanager</target>
  235. </condition>
  236. <condition name='disabled_if_in' source='addTargetPrometheus'>
  237. <param>non</param>
  238. <target type='variable'>prTarg</target>
  239. <target type='variable'>prTargIP</target>
  240. <target type='variable'>prTargSonde</target>
  241. </condition>
  242. <condition name='disabled_if_in' source='addPrOpenTarg'>
  243. <param>non</param>
  244. <target type='variable'>prOpenTarg</target>
  245. <target type='variable'>prOpenTargIP</target>
  246. <target type='variable'>prOpenTargPort</target>
  247. </condition>
  248. </constraints>
  249. <help>
  250. </help>
  251. </creole>