平台健康
Splunk 的八项体检与 AI 解读;慢搜索顾问:从 _audit 找最耗时的搜索,改写、在真数据上比对结果数、应用到 saved search。
平台健康是「管理」组的第一页,页签族里还有调用审计、对外通道,页内另有「搜索性能」页签。体检所有版本都有;AI 解读是付费能力。

体检
八项,每项 ok / warn / fail / unknown + 摘要 + 证据 + 建议,阈值在 [platform]:
| 项 | 看什么 | 来源 |
|---|---|---|
| splunkd 健康 | health 树里黄 / 红的 feature 与原因 | /services/server/health/splunkd/details |
| 索引器集群 | 集群状态;单实例标 ok | /services/cluster/manager/info |
| 许可用量 | 池用量百分比、警告次数(5 次 = fail) | /services/licenser/pools |
| 内部错误率 | 24 小时 log_level=ERROR 按组件 | index=_internal |
| 调度跳过率 | 跳过比例、跳得最多的 saved search 与原因 | index=_internal sourcetype=scheduler |
| KV store | 状态 | /services/kvstore/status |
| 接入新鲜度 | 每个 sourcetype 最近一条距今多久(总量 < 100 的不算) | | metadata type=sourcetypes |
| 时钟基线 | 事件时间领先当前时间(采集端时钟错) | 同上 |
普通用户没有 licenser / cluster 等端点的读权限时,对应项标 unknown。Splunk Free 许可下集群端点返回 402,也标 unknown。
AI 解读
「解读」把八项结果交给模型:串起相关的失败(「两类日志同秒断流 → 上游采集链路」)、给结论与 actions[{title, why, how}],how 里是只读 SPL。知识库命中的手册会一起进提示词。1.9.0 真机 25–32 秒。

搜索性能(1.8.0 起)
「搜索性能」页签从 _audit 取最近 7 天完成的搜索(action=search info=completed),排除本 App 自己的、DMC 内务的、splunk-system-user 的,按总耗时排 Top 20:
| 列 | 说明 |
|---|---|
| 搜索 | SPL 片段 |
| 次数 / 总耗时 | 7 天内 |
| 扫描效率 | event_count / scan_count,越低越浪费 |
| 来源 | 是哪个 saved search(能应用改写的前提) |

行内「优化」:模型给 optimized_spl / expected_gain / why / risk,然后新旧 SPL 各 | head 0 校验语法、各 | stats count 比对结果数([spl_advisor] verify_window,默认 -24h),verified 标明结果数是否一致。典型改写:index=* | stats count by host → index=rst_demo | fields host | stats count by host。

「应用到 saved search」(管理员)改它的 search 字段,先备份到 KV(copilot_state kind advisor_backup),行上可「回滚」;只有经本页应用过的搜索有备份,否则 advisor_no_backup。_audit 里取消 / 僵尸作业写的 2^64 级 total_run_time 已过滤。