Files
ewoooc/monitoring/prometheus.yml
OoO 2b9991096b
All checks were successful
CD Pipeline / deploy (push) Successful in 1m46s
fix(monitoring): 移除失效 blackbox 目標
2026-04-30 14:39:33 +08:00

103 lines
2.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'wooo-uat-monitor'
environment: 'uat'
# Alertmanager configuration (可選)
alerting:
alertmanagers:
- static_configs:
- targets: []
# 規則檔案
rule_files:
- "alert_rules.yml"
# 監控目標配置
scrape_configs:
# Prometheus 自身監控
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
labels:
instance: 'prometheus'
# cAdvisor 監控(容器指標)
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
labels:
instance: 'uat-docker-host'
# Node Exporter 監控(主機指標)
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
labels:
instance: 'uat-server'
environment: 'uat'
# MOMO Flask app metrics含 AI automation /metrics
- job_name: 'momo-app'
metrics_path: /metrics
static_configs:
- targets: ['momo-pro-system:80']
labels:
instance: 'momo-pro-system'
service: 'application'
environment: 'uat'
# Blackbox - HTTP/HTTPS 網站監控
- job_name: 'blackbox-http'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- https://mo.wooo.work
- http://192.168.0.110:5000
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# Blackbox - TCP 端口檢查
- job_name: 'blackbox-tcp'
metrics_path: /probe
params:
module: [tcp_connect]
static_configs:
- targets:
- 192.168.0.110:3000 # Grafana
- 192.168.0.110:9090 # Prometheus
- 192.168.0.110:5000 # MOMO
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# Blackbox - ICMP Ping 檢查
- job_name: 'blackbox-icmp'
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- 192.168.0.110 # UAT Server
- 8.8.8.8 # Google DNS
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115