Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

74 wiersze
2.4 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. global:
  3. scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  4. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  5. # scrape_timeout is set to the global default (10s).
  6. # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
  7. rule_files:
  8. {% if matrix_prometheus_scraper_synapse_rules_enabled %}
  9. - 'synapse-v2.rules'
  10. {% endif %}
  11. # A scrape configuration containing exactly one endpoint to scrape:
  12. # Here it's Prometheus itself.
  13. scrape_configs:
  14. # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  15. - job_name: 'prometheus'
  16. # Override the global default and scrape targets from this job every 5 seconds.
  17. scrape_interval: 5s
  18. scrape_timeout: 5s
  19. # metrics_path defaults to '/metrics'
  20. # scheme defaults to 'http'.
  21. static_configs:
  22. - targets: ['localhost:9090']
  23. {% if matrix_prometheus_scraper_synapse_enabled %}
  24. - job_name: 'synapse'
  25. metrics_path: '/_synapse/metrics'
  26. static_configs:
  27. - targets: {{ matrix_prometheus_scraper_synapse_targets|to_json }}
  28. labels:
  29. instance: {{ matrix_domain | to_json }}
  30. job: master
  31. index: 0
  32. {% for worker in matrix_prometheus_scraper_synapse_workers_enabled_list %}
  33. {% if worker.metrics_port != 0 %}
  34. - targets: ['{{ worker.name }}:{{ worker.metrics_port }}']
  35. labels:
  36. instance: {{ matrix_domain | to_json }}
  37. worker_id: {{ worker.id | to_json }}
  38. job: {{ worker.type | to_json }}
  39. app: {{ worker.app | to_json }}
  40. {% endif %}
  41. {% endfor %}
  42. {% endif %}
  43. {% if matrix_prometheus_scraper_node_enabled %}
  44. - job_name: node
  45. static_configs:
  46. - targets: {{ matrix_prometheus_scraper_node_targets|to_json }}
  47. {% endif %}
  48. {% if matrix_prometheus_scraper_postgres_enabled %}
  49. - job_name: postgres
  50. static_configs:
  51. - targets: {{ matrix_prometheus_scraper_postgres_targets|to_json }}
  52. {% endif %}
  53. {% if matrix_prometheus_scraper_hookshot_enabled %}
  54. - job_name: hookshot
  55. static_configs:
  56. - targets: {{ matrix_prometheus_scraper_hookshot_targets|to_json }}
  57. {% endif %}
  58. {% if matrix_prometheus_scraper_nginxlog_enabled %}
  59. - job_name: nginxlog
  60. static_configs:
  61. - targets:
  62. - {{ matrix_prometheus_scraper_nginxlog_server_port}}
  63. {% endif %}