-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
102 lines (88 loc) · 3.53 KB
/
config.example.toml
File metadata and controls
102 lines (88 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# MotdTracker 配置文件
# 复制此文件为 config.toml 并修改配置
# =============================================================================
# 基础配置
# =============================================================================
# 服务器显示名称(显示在页面标题)
server_name = "MyMinecraftServer"
# SQLite 数据库文件路径
database = "minecraft_stats.db"
# 轮询间隔(秒)
# 24h 统计窗口自动计算为 86400 / poll_interval 条记录
# 示例:15 秒间隔 = 5760 条/24h
poll_interval = 15
# Web 服务端口
port = 5011
# API-only 模式(true 时不注册 Flask 页面路由,仅提供 API/WebSocket)
api_only = false
# 前端跨域来源(支持字符串 "*" 或字符串数组)
# frontend_origins = "*"
# frontend_origins = ["http://127.0.0.1:5173", "http://localhost:5173"]
frontend_origins = "*"
# =============================================================================
# 节点配置
# =============================================================================
# 每个 [[nodes]] 块定义一个 Minecraft 服务器入口点
# id: 节点唯一标识(整数,用于 API 访问)
# name: 节点显示名称
# host: 服务器地址(域名或 IP)
# port: 服务器端口(默认 25565)
# color: 图表颜色(十六进制,可选)
# enable: 是否启用轮询(设为 false 时跳过该节点)
[[nodes]]
id = 1
name = "主线入口"
host = "play.example.com"
port = 25565
color = "#10b981"
enable = true
[[nodes]]
id = 2
name = "备用线路"
host = "backup.example.com"
port = 25565
color = "#667eea"
enable = true
# 更多节点示例(可根据需要添加)
# [[nodes]]
# id = 3
# name = "电信优化"
# host = "ct.example.com"
# port = 25565
# color = "#f59e0b"
# enable = true
# =============================================================================
# PostgreSQL 配置(可选)
# =============================================================================
# 如果配置了 PostgreSQL,将自动从 SQLite 迁移数据
# 取消下方注释并填写正确的连接信息即可启用
#
# [postgresql]
# host = "localhost"
# port = 5432
# database = "motdtracker"
# user = "your_username"
# password = "your_password"
# =============================================================================
# 告警配置(可选)
# =============================================================================
# NapCat 机器人告警通知
# 当服务器状态发生变化时发送通知到 QQ 群
#
# [napcat_alert]
# host = "napcat-host:port" # NapCat 服务地址
# groups = ["123456789", "987654321"] # QQ 群号列表
# delta_minutes = 30 # 状态变化冷却时间(分钟)
# offline_confirm_frames = 3 # 离线确认帧数(连续离线多少次才发送告警)
# online_confirm_frames = 3 # 在线确认帧数(连续在线多少次才发送恢复通知)
# =============================================================================
# Umami 分析配置(可选)
# =============================================================================
# Umami 是一个开源、隐私友好的网站分析工具
# 配置后将在所有页面自动加载 Umami 跟踪脚本
#
# [umami]
# enabled = true # 是否启用 Umami 跟踪
# script_url = "https://analytics.example.com/script.js" # Umami 脚本地址
# website_id = "your-website-id" # 网站 ID(在 Umami 后台获取)
# domains = "example.com,www.example.com" # 可选:限定域名(逗号分隔)