prometheus.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # my global config
  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. # Alertmanager configuration
  7. alerting:
  8. alertmanagers:
  9. - static_configs:
  10. - targets:
  11. - localhost:9993
  12. # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
  13. rule_files:
  14. - "rules/*.rules"
  15. # - "first_rules.yml"
  16. # - "second_rules.yml"
  17. # A scrape configuration containing exactly one endpoint to scrape:
  18. # Here it's Prometheus itself.
  19. scrape_configs:
  20. # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  21. - job_name: "prometheus"
  22. # metrics_path defaults to '/metrics'
  23. # scheme defaults to 'http'.
  24. static_configs:
  25. - targets: ["localhost:9990"]
  26. #NodeExporter
  27. - job_name: "NodeExporter"
  28. metrics_path: /metrics
  29. static_config:
  30. - targets: [ "localhost: 9100" ]
  31. #clickhouse
  32. - job_name: "clickhouse"
  33. metrics_path: /metrics
  34. static_config: #todo:设置clickhouse目标
  35. - targets:
  36. - 'target1:port'
  37. - targets:
  38. - 'target2:port'
  39. #clickhouse-keeper
  40. - job_name: "clickhouse-keeper"
  41. metrics_path: /metrics
  42. static_config:
  43. - targets:
  44. - ''
  45. - targets:
  46. - ''
  47. - job_name: "blackbox_clickhouse_instance"
  48. metrics_path: /probe
  49. params:
  50. module: [ tcp_connect ]
  51. static_configs:
  52. - targets:
  53. - 'target1:port'
  54. relabel_configs:
  55. - source_labels: [ __address__ ]
  56. target_label: __param_target
  57. - source_labels: [ __param_target ]
  58. target_label: instance
  59. - target_label: __address__
  60. replacement: 'localhost:9115'
  61. - job_name: "blackbox_ckkeeper_instance"
  62. metrics_path: /probe
  63. params:
  64. module: [ tcp_connect ]
  65. static_configs:
  66. - targets:
  67. - ':'
  68. relabel_configs:
  69. - source_labels: [ __address__ ]
  70. target_label: __param_target
  71. - source_labels: [ __param_target ]
  72. target_label: instance
  73. - target_label: __address__
  74. replacement: 'localhost:9115'