SuperAPI AI 工具集

fluentbit-validator

通用与其它

查看项目

更新于 10-15 16:47

技能介绍

用途:对 Fluent Bit 经典模式配置做确定性、可重复的校验,适用于部署前检查、配置 lint、标签路由与输出匹配核对、安全检查和 dry-run 失败定位。

主要能力:静态校验(结构、段落、标签、安全、性能、最佳实践),可选 dry-run;支持 --json 输出与 --fail-on-warning 严格 CI 门禁;按 Error、Warning、Recommendation 三级严重度报告,并给出修复流程。

使用方式:先执行 Stage 0 预检,确认 python3 与 fluent-bit 是否可用;随后运行 python3 scripts/validate_config.py --file <config-file> --check all,也可用 --check structure/sections/tags/security/performance/best-practices/dry-run 做定向检查。dry-run 命令为 fluent-bit -c <config-file> --dry-run;若需作为发布门禁,使用 --check dry-run --require-dry-run。仓库内提供 scripts/validate_config.py、scripts/validate.sh 及 tests/*.conf 样例。

限制与回退:缺少 python3 时停止脚本校验并转为人工审查;缺少 fluent-bit 时继续静态检查、跳过 dry-run 并记录一条 Recommendation;无网络或文档访问时,未知插件细节以 Warning 标注“doc lookup deferred”;用户要求仅报告时不修改文件。修改用户文件前需获得批准,修复后需重跑同一校验命令并报告差异与最终状态。