主要更新内容
- 新增公开 RPC 方法
public:recordVisitorEvent,允许前端主题写入访客审计事件,默认关闭,需管理员通过visitor_audit_enabled启用;内置按 IP 的令牌桶限流(每分钟 30 次,突发 10 次) - 移除全局
metric_retention_days配置项和DefaultRetentionDays,每个指标必须显式指定保留天数;自动迁移清理旧配置 - 删除客户端或 Ping 任务时自动清理关联的指标数据,避免孤立数据残留
- 新增
compaction_watermark表持久化指标压缩边界,提升跨请求的数据查询准确性 - 任务结果清理改为硬编码 30 天保留,不再依赖指标保留配置
admin:getLogs新增按msg_type参数过滤,支持精确筛选日志类型- 审计日志表新增
idx_logs_time和(msg_type, time)复合索引,优化查询性能 - 默认关闭降采样(downsampling),改为按需在
metric_downsampling_enabled中启用 public:getPublicSettings公开返回visitor_audit_enabled及兼容旧主题的record_enabled、record_preserve_time- 支持 loong64(龙芯)架构:构建流水线和安装脚本新增 loong64 目标
Bug修复
- 修复包级别重复
firstNonEmpty声明导致的编译冲突 - 修复零保留天数(
RetentionDays=0)的指标在创建、迁移和压缩过程中被错误覆盖的问题,确保禁用状态的指标维持不变 - 修复 Ping 记录查询仅读取原始点,导致压缩后数据丢失;改用
Series聚合查询,同时读取原始和 rollup 数据
其他
- 移除
generate-release-notes.yml中的komari-web-release-published仓库调度和定时触发 - 调整默认 rollup 策略最终层保留为 14 天(原为 30 天),简化策略计算逻辑
- 指标创建/更新时所有测试用例显式设置
RetentionDays - 新增
docs/visitor-audit-rpc.md文档说明访客审计 RPC 用法
What's Changed
- feat(rpc): add public visitor audit event endpoint by @sanrokamlan-prog in #597
- fix: harden visitor audit logging by @sanrokamlan-prog in #602
Commits
- disable downsampling by default (724dd3b) @Akizon77
- feat: add visitor audit rpc endpoint (7679430) @sanrokamlan-prog
- Update generate-release-notes.yml (5c73eba) @Akizon77
- Merge pull request #597 from sanrokamlan-prog/visitor-audit-rpc (1eb3549) @Akizon77
- fix: harden visitor audit logging (0c80f0f) @sanrokamlan-prog
- Merge pull request #602 from sanrokamlan-prog/fix/visitor-audit-hardening (5fa59ab) @Akizon77
- refactor: replace static retention config with dynamic retention summary (7f36881) @Akizon77
- fix: preserve zero-retention metric definitions across operations (66b7691) @Akizon77
- refactor(metrics): remove DefaultRetentionDays config option and enforce explicit retention (7baf2ed) @Akizon77
- fix: reduce default built-in metric retention to 1 day for testing (c1178eb) @Akizon77
- fix(metricstore): use Series to read ping records for rollup support (e2a8284) @Akizon77
- feat: clean metric store before deleting client or ping task (43547b9) @Akizon77
- feat(metric): add compaction watermark upsert and update storage queries (5b90804) @Akizon77
- feat: #414 add support for loong64 architecture (fc3febc) @Akizon77
New Contributors
- @sanrokamlan-prog made their first contribution in #597
Full Changelog: 1.2.6...Snapshot-2607162023