如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Finala是一款云资源扫描工具,旨在分析和报告云环境中浪费及未使用的资源,帮助用户减少不必要的支出。该工具基于YAML配置文件(无需编写代码),可通过默认配置或自定义YAML文件进行资源检测,并将报告结果存储到指定位置。目前主要支持AWS云服务,未来将扩展更多云平台支持。
Finala由以下四个核心组件构成:
API:RESTful API服务器,接收Collector的事件数据并为UI提供服务。配置文件示例:https://github.com/similarweb/finala/blob/master/configuration/api.yaml
UI:用户界面,以可视化方式展示资源分析结果。
Notifier:通知组件,支持多种通知方式(目前仅支持Slack),向指定通知组推送"利用率低"的资源报告。配置文件示例:https://github.com/similarweb/finala/blob/master/configuration/notifier.yaml
Collector:收集并分析资源数据,根据https://github.com/similarweb/finala/blob/master/configuration/collector.yaml%E4%B8%AD%E5%AE%9A%E4%B9%89%E7%9A%84%E9%98%88%E5%80%BC%E6%A3%80%E6%B5%8B%E8%B5%84%E6%BA%90%E5%88%A9%E7%94%A8%E7%8E%87%E3%80%82%E6%94%AF%E6%8C%81%E9%85%8D%E7%BD%AE%E5%A4%9A%E4%B8%AAAWS%E8%B4%A6%E6%88%B7%E5%92%8C%E5%8C%BA%E5%9F%9F%E3%80%82
AWS账户和区域配置
在collector.yaml中配置AWS账户和区域:
yamlproviders: aws: - name: <ACCOUNT_NAME> # 若未设置以下变量,将使用环境变量 access_key: <ACCESS_KEY> secret_key: <SECRET_KEY> session_token: "" # 可选,默认不设置 regions: - <REGION>
资源检测规则配置
可通过YAML定义资源检测规则,以下是常用示例:
yamlec2: - description: EC2 CPU利用率 metrics: - name: CPUUtilization statistic: Maximum period: 24h start_time: 168h # 24h * 7d constraint: operator: "<" value: 5
yamlrds: - description: 数据库连接数 metrics: - name: DatabaseConnections statistic: Sum period: 24h start_time: 168h # 24h * 7d constraint: operator: "==" value: 0
yamlelb: - description: 负载均衡器请求数 metrics: - name: RequestCount statistic: Sum period: 24h start_time: 168h # 24h * 7d constraint: operator: "==" value: 0
yamldynamodb: - description: 预配置读容量单位利用率 metrics: - name: ConsumedReadCapacityUnits statistic: Sum - name: ProvisionedReadCapacityUnits statistic: Sum period: 24h start_time: 168h # 24h * 7d constraint: formula: ConsumedReadCapacityUnits / ProvisionedReadCapacityUnits * 100 operator: "<" value: 10
使用Kubernetes部署
参考https://github.com/similarweb/finala-helm%E8%8E%B7%E5%8F%96%E8%AF%A6%E7%BB%86%E9%83%A8%E7%BD%B2%E8%AF%B4%E6%98%8E%E3%80%82
使用Docker Compose本地运行
shelldocker-compose up
UI将暴露在8080端口,可通过[***]
Collector
shellgo run main.go collector -c ./configuration/collector.yaml
Notifier
shellgo run main.go notifier -c ./configuration/notifier.yaml
API
shellgo run main.go api -c ./configuration/api.yaml
UI
shellcd ui npm run dev
或
shellmake build-ui go run main.go ui -c ./configuration/ui.yaml
!https://raw.githubusercontent.com/similarweb/finala/master/docs/dashboard.png
!https://raw.githubusercontent.com/similarweb/finala/master/docs/resource.jpg
!https://raw.githubusercontent.com/similarweb/finala/master/docs/slack.png
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务