技能 硬件工程 系统指标观察与异常检测

系统指标观察与异常检测

v20260716
observe-metrics
用于聚合和展示系统观测命名空间中的各类指标(计数器、仪表盘、直方图)。它能计算历史基线并检测偏离标准差的异常值,帮助用户获取系统健康状况、错误率、内存占用和性能退化趋势的完整快照。
获取技能
382 次下载
概览

Observe Metrics

Aggregate counters, gauges, and histograms from the observability namespace and flag anomalies.

When to use

When you need a snapshot of system health -- task completion rates, error rates, active agent counts, memory usage, and token consumption. Useful for monitoring swarm performance and detecting degradation.

Steps

  1. Retrieve metrics -- call mcp__plugin_ruflo-core_ruflo__memory_search --namespace observability (or memory_list) to fetch metric records for the specified period (default: 1 hour). The memory_* tool family routes by namespace; agentdb_hierarchical-* does NOT, so use memory_* here.
  2. Aggregate -- compute:
  • Counters: sum totals (taskscompleted, errors, tokenusage)
  • Gauges: current values (activeagents, memoryusage_bytes)
  • Histograms: p50, p95, p99 (taskdurationms, spandurationms)
  1. Compute baselines -- call mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search (ReasoningBank-routed; don't pass a namespace argument — pattern-* tools ignore it) to establish baseline values for each metric.
  2. Flag anomalies -- mark metrics deviating >2 standard deviations from baseline with direction (above/below) and severity
  3. Store patterns -- two paths (per ruflo-cost-tracker ADR-0001 dual-path pattern):
  • Pattern store (typed, recommended): mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store with type: 'metric-snapshot'. No namespace arg.
  • Plain store (namespace-routable): mcp__plugin_ruflo-core_ruflo__memory_store --namespace observability for the snapshot tied to a timestamp.
  1. Report -- display: metric name, current value, baseline, deviation, trend (up/down/stable), anomaly flag; overall health score (green/yellow/red)

CLI alternative

npx @claude-flow/cli@latest memory search --query "system metrics for last hour" --namespace observability
信息
分类 硬件工程
名称 observe-metrics
版本 v20260716
大小 2.31KB
更新时间 2026-07-18
语言