java/monitoring/prometheus.yml
liRQ 39a5d5d4ee 任务:添加监控及服务重启脚本
添加Prometheus/Grafana/Loki监控配置、Promtail配置、业务与监控服务器docker-compose文件以及Bash/PowerShell服务重启脚本
2026-06-25 18:27:47 +08:00

56 lines
1.5 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 # 每15秒采集一次指标
evaluation_interval: 15s # 每15秒评估一次告警规则
scrape_configs:
# Prometheus 自身监控
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# 监控服务器自身指标(通过 Node Exporter
- job_name: 'node-exporter-monitor'
static_configs:
- targets: ['node-exporter:9100']
labels:
server: 'monitor'
# 业务服务器指标(通过业务服务器上的 Node Exporter
- job_name: 'node-exporter-business'
static_configs:
- targets: ['118.178.238.159:9100']
labels:
server: 'business'
# 网关服务监控端口8888
- job_name: 'wangpan-gateway'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['118.178.238.159:8888']
labels:
service: 'gateway'
# 用户服务监控
- job_name: 'wangpan-user-service'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['118.178.238.159:8081']
labels:
service: 'user-service'
# 网盘服务监控
- job_name: 'wangpan-drive-service'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['118.178.238.159:8082']
labels:
service: 'drive-service'
# TMDB服务监控
- job_name: 'wangpan-tmdb-service'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['118.178.238.159:8083']
labels:
service: 'tmdb-service'