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.

64 lines
1.8 KiB

  1. global:
  2. scrape_interval: 30s
  3. evaluation_interval: 30s
  4. scrape_configs:
  5. - job_name: "node"
  6. static_configs:
  7. - targets: ['{{ site_hostname }}:9100']
  8. - job_name: "redis"
  9. static_configs:
  10. - targets: ['{{ site_hostname }}:9121']
  11. - job_name: "postgres"
  12. static_configs:
  13. - targets: ['{{ site_hostname }}:9187']
  14. - job_name: "tildes"
  15. scheme: https
  16. static_configs:
  17. - targets: ['{{ site_hostname }}:443']
  18. {% if site_hostname == "localhost" -%}
  19. tls_config:
  20. insecure_skip_verify: true
  21. {% endif %}
  22. # use blackbox exporter to check site is responding on IPv4
  23. - job_name: "site_ipv4"
  24. metrics_path: /probe
  25. params:
  26. module: [site_ipv4]
  27. static_configs:
  28. - targets:
  29. - https://{{ site_hostname }}
  30. relabel_configs:
  31. - source_labels: [__address__]
  32. target_label: __param_target
  33. - source_labels: [__param_target]
  34. target_label: instance
  35. - target_label: __address__
  36. replacement: 127.0.0.1:9115 # The blackbox exporter's real hostname:port
  37. # use blackbox exporter to check site is responding on IPv6
  38. - job_name: "site_ipv6"
  39. metrics_path: /probe
  40. params:
  41. module: [site_ipv6]
  42. static_configs:
  43. - targets:
  44. - https://{{ site_hostname }}
  45. relabel_configs:
  46. - source_labels: [__address__]
  47. target_label: __param_target
  48. - source_labels: [__param_target]
  49. target_label: instance
  50. - target_label: __address__
  51. replacement: 127.0.0.1:9115 # The blackbox exporter's real hostname:port
  52. # event stream consumers (background jobs)
  53. {% for name, port in prometheus_consumer_scrape_targets.items() -%}
  54. - job_name: "consumer_{{ name }}"
  55. static_configs:
  56. - targets: ['{{ site_hostname }}:{{ port }}']
  57. {% endfor %}