prometheus.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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(9100) //todo 填写端口与地址
  27. - job_name: "NodeExporter"
  28. metrics_path: /metrics
  29. static_configs:
  30. - targets: 'localhost: 9100'
  31. - targets: ''
  32. - targets: ''
  33. - targets: ''
  34. #clickhouse(9363) //todo 填写端口与地址 (配置文件中prometheus收集指标的端口 默认为9363)
  35. - job_name: "clickhouse"
  36. metrics_path: /metrics
  37. static_configs:
  38. - targets:
  39. - 'target1:port'
  40. - targets:
  41. - 'target2:port'
  42. #clickhousekeeper() //todo : 填写端口与地址
  43. - job_name: "clickhouse-keeper"
  44. metrics_path: /metrics
  45. static_configs:
  46. - targets:
  47. - 'target1:port'
  48. - targets:
  49. - 'target2:port'
  50. #clickhouse(8123) //todo: 填写端口与地址
  51. - job_name: "blackbox_clickhouse_instance"
  52. metrics_path: /probe
  53. params:
  54. module: [ tcp_connect ]
  55. static_configs:
  56. - targets:
  57. - 'target1:port'
  58. - ':'
  59. - ':'
  60. relabel_configs:
  61. - source_labels: [ __address__ ]
  62. target_label: __param_target
  63. - source_labels: [ __param_target ]
  64. target_label: instance
  65. - target_label: __address__
  66. replacement: 'localhost:9115'
  67. #clickhouse-keeper //todo:填写端口与地址
  68. - job_name: "blackbox_ckkeeper_instance"
  69. metrics_path: /probe
  70. params:
  71. module: [ tcp_connect ]
  72. static_configs:
  73. - targets:
  74. - ':'
  75. - ':'
  76. - ':'
  77. relabel_configs:
  78. - source_labels: [ __address__ ]
  79. target_label: __param_target
  80. - source_labels: [ __param_target ]
  81. target_label: instance
  82. - target_label: __address__
  83. replacement: 'localhost:9115'
  84. #postgres(5432) // todo: 填写端口与地址
  85. - job_name: "blackbox_postgres_instance"
  86. metrics_path: /probe
  87. params:
  88. module: [ tcp_connect ]
  89. static_configs:
  90. - targets:
  91. - ':'
  92. - ':'
  93. - ':'
  94. relabel_configs:
  95. - source_labels: [ __address__ ]
  96. target_label: __param_target
  97. - source_labels: [ __param_target ]
  98. target_label: instance
  99. - target_label: __address__
  100. replacement: 'localhost:9115'