Files
aiops/backend/config.yaml.example
T

162 lines
2.9 KiB
Plaintext

# AIOps 配置文件示例
# 复制此文件为 config.yaml 并根据实际情况修改
# 应用配置
app:
name: "AIOps"
version: "1.0.0"
port: 8080
mode: "debug" # debug, release, test
# 数据库配置
database:
# 数据库类型: mysql, postgres
driver: "mysql"
# MySQL配置
mysql:
host: "localhost"
port: 3306
username: "ezops"
password: "your_password"
database: "ezops"
charset: "utf8mb4"
max_idle_conns: 10
max_open_conns: 100
conn_max_lifetime: 3600 # 秒
# PostgreSQL配置
postgres:
host: "localhost"
port: 5432
username: "ezops"
password: "your_password"
database: "ezops"
ssl_mode: "disable"
max_idle_conns: 10
max_open_conns: 100
conn_max_lifetime: 3600 # 秒
# Redis配置
redis:
enabled: false
host: "localhost"
port: 6379
password: ""
database: 0
pool_size: 10
# JWT配置
jwt:
secret: "your_jwt_secret_key_change_this_in_production"
expire_hours: 24
refresh_hours: 168 # 7天
# 日志配置
log:
level: "info" # debug, info, warn, error
format: "json" # json, console
output: "stdout" # stdout, file
file_path: "./logs/ezops.log"
max_size: 100 # MB
max_backups: 10
max_age: 30 # 天
compress: true
# CORS配置
cors:
allowed_origins:
- "http://localhost:3000"
- "http://localhost:5173"
allowed_methods:
- "GET"
- "POST"
- "PUT"
- "DELETE"
- "OPTIONS"
allowed_headers:
- "*"
allow_credentials: true
max_age: 86400
# 文件上传配置
upload:
max_size: 10485760 # 10MB
allowed_types:
- ".xlsx"
- ".xls"
- ".csv"
- ".json"
- ".yaml"
- ".yml"
upload_path: "./uploads"
# WebSocket配置
websocket:
read_buffer_size: 1024
write_buffer_size: 1024
ping_period: 30 # 秒
pong_wait: 60 # 秒
# 监控配置
monitor:
enabled: true
metrics_port: 9090
pprof_enabled: false
# 云平台配置
cloud:
# 阿里云配置
aliyun:
enabled: false
access_key_id: ""
access_key_secret: ""
region: "cn-hangzhou"
# 腾讯云配置
tencent:
enabled: false
secret_id: ""
secret_key: ""
region: "ap-guangzhou"
# AWS配置
aws:
enabled: false
access_key_id: ""
secret_access_key: ""
region: "us-east-1"
# 华为云配置
huawei:
enabled: false
access_key_id: ""
secret_access_key: ""
region: "cn-north-1"
# 告警通知配置
notification:
# 邮件配置
email:
enabled: false
smtp_host: "smtp.example.com"
smtp_port: 587
username: ""
password: ""
from: "ezops@example.com"
use_tls: true
# 钉钉配置
dingtalk:
enabled: false
webhook_url: ""
secret: ""
# 企业微信配置
wechat:
enabled: false
webhook_url: ""
# Slack配置
slack:
enabled: false
webhook_url: ""
# 审计日志配置
audit:
enabled: true
retention_days: 365 # 日志保留天数
async_write: true # 异步写入