← 返回案例库
CUSTOMER STORY · 会议纪要与团队协作

Google SRE 模拟故障:Gemini CLI 两分钟内找到错误配置并回滚

Diagnose and roll back bad config during outages

Tools · 使用工具Gemini
Source · 来源原作者 · cloud.google.com
Zaowuyun · 可参考能力上下文管理
01

谁在用

Who

Google 的站点可靠性工程师(模拟演练)。

02

遇到什么问题

Challenge

线上故障时要快速关联指标、日志和近期变更,找出根因。

03

怎么用 AI 解决

Solution
  1. SRE 打开 Gemini CLI,通过内部 ProdAgent 工具拉取事件详情、关联时间序列并分析日志。
  2. 智能体建议重启方案并获批,但重启失败。
  3. 它转而检查服务源码和近期变更,找出错误的配置推送,起草回滚变更。
04

结果如何

Results据原作者自述
  • 不到两分钟找到错误配置,回滚后服务恢复
  • 这是模拟场景;每次生产变更都需人批准,智能体只能用受策略检查的工具

以上内容均由原作者自行报告,未经独立核实,也不代表造物云产品的效果。

05

提示词

Prompt

参考提示词(由 agentusecases.ai 整理为模板,非原帖原文)

中文

【服务名】正在故障。从【日志来源或命令】拉取近期日志,找出与报错时间吻合的最近一次配置变更并说明证据。然后以补丁或 PR 的形式起草回滚,并列出复盘要点。上线前等我批准。

ENGLISH

An outage is happening in [service name]. Pull the recent logs from [log source or command], find the most recent config change that lines up with the errors, and explain your evidence. Then draft a revert of that change as a patch or pull request, and write a list of postmortem action items. Stop once the revert and action items are ready, and show me both before you push, deploy, or file anything.