跳到主要内容

事件与历史

Testudo 使用 Kubernetes Event、CRD status history 和统计资源组成可观测性。

Kubernetes Event

Operator 在关键状态变化和错误处发出事件。Server 暴露:

  • GET /apis/v1/events
  • GET /apis/v1/watch/events
  • GET /apis/v1/:resource/:name/history
  • GET /apis/v1/watch/:resource/:name/events

控制台的 事件与审计 / 任务事件 页面会聚合任务事件,适合作为排障第一入口。

任务事件

同步历史

DataSync.status.historyResourceSync.status.history 记录最近同步:

  • 开始时间。
  • 完成时间。
  • 耗时。
  • backup 名称。
  • restore 名称。
  • 备份/恢复资源数量。
  • 状态。

操作历史

DisasterOperation 保留步骤明细,Server 也提供实例和组的 operation 查询接口:

  • GET /apis/disasterinstances.testudo.softcdata.com/v1/instances/:name/history
  • GET /apis/disasterinstances.testudo.softcdata.com/v1/instances/:name/operations/:operationName
  • GET /apis/disastergroups.testudo.softcdata.com/v1/groups/:name/history
  • GET /apis/disastergroups.testudo.softcdata.com/v1/groups/:name/operations/:operationName

排障建议

排查时建议按顺序查看:

  1. Server API response 的 reason/message。
  2. 对应 CRD status。
  3. DisasterOperation.status.steps
  4. Kubernetes Event。
  5. Velero Backup/Restore status。
  6. operator 日志。