Eolisation de Prometheus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70_prometheus.xml 14KB

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