添加docker部署方式,优化目前项目结构,更新了readme文件

This commit is contained in:
赵杰
2025-09-22 16:36:50 +01:00
parent d6c88d87dd
commit 1e4376ba56
10 changed files with 850 additions and 32 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
updateIntervalSeconds: 10
allowUiUpdates: true
options:
path: /etc/grafana/provisioning/dashboards

View File

@@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: true

45
monitoring/prometheus.yml Normal file
View File

@@ -0,0 +1,45 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
# Prometheus自身监控
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# TSP助手应用监控
- job_name: 'tsp-assistant'
static_configs:
- targets: ['tsp-assistant:5000']
metrics_path: '/api/metrics'
scrape_interval: 30s
scrape_timeout: 10s
# MySQL监控
- job_name: 'mysql'
static_configs:
- targets: ['mysql:3306']
scrape_interval: 30s
# Redis监控
- job_name: 'redis'
static_configs:
- targets: ['redis:6379']
scrape_interval: 30s
# Nginx监控
- job_name: 'nginx'
static_configs:
- targets: ['nginx:80']
scrape_interval: 30s
# Node Exporter系统监控
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
scrape_interval: 30s