配置项
copilot.conf 各节的含义与默认值;哪些在界面里改、哪些只能改文件;API key 的存放顺序。
配置文件是 $SPLUNK_HOME/etc/apps/rst_splunk_ai_copilot/local/copilot.conf,覆盖 default/copilot.conf。界面能改的项(AI 配置、系统设置、对外通道、MCP 接入)写进同一个文件;密钥一律进 storage/passwords,不进 conf。改了文件后不用重启,handler 每次请求读配置服务;只有新增脚本输入(MCP、定时任务)需要 splunk restart。
[llm]
| 键 | 默认 | 说明 |
|---|---|---|
base_url | https://ark.cn-beijing.volces.com/api/coding/v3 | OpenAI 兼容端点,带到版本路径 |
model | ark-code-latest | |
api_key | 空 | 明文兜底。优先在 AI 配置页填,存 storage/passwords |
timeout_seconds | 60 | 单次请求超时;调查 / 平台解读等长任务各自更长 |
max_tokens | 1024 | 各功能有自己的上限(解读 / 分诊 / 调查更大) |
temperature | 0.1 | |
response_language | auto | AI 输出语言:auto 跟浏览器语言,zh / en 固定 |
reasoning | off | 思考模式:off 关;auto 不发参数跟模型默认;low / high 固定档。按模型家族翻译成各家参数,不认识的模型不发 |
API key 取值顺序:环境变量 RST_COPILOT_LLM_API_KEY → storage/passwords → [llm] api_key。多 provider 与故障转移链在 AI 配置页配,写在 [llm_provider:<id>] 节。
[masking]
| 键 | 默认 | 说明 |
|---|---|---|
mode | cloud | cloud:IP 归到 /24、邮箱只留域名、密钥 / 令牌打码;private:IP 归到 /16、邮箱部分保留;airgapped:不脱敏,只给完全在内网的模型用。环境变量 RST_MASKING_MODE 可硬钉,界面改不了 |
脱敏在数据离开 Splunk 前做,包括模型自己通过工具拉的数据。
[limits]
| 键 | 默认 | 说明 |
|---|---|---|
rate_per_min | 30 | 每用户每分钟 AI 请求上限,令牌桶;0 关 |
burst | 10 | 突发上限 |
agentic_index_whitelist | 空 | 逗号分隔。只约束模型自主调工具时能碰的索引;用户自己指定的 SPL 不受它管。空 = 不限。同时也是首页「全部日志」范围与 MCP list_indexes 的范围 |
[agentic]
| 键 | 默认 | 说明 |
|---|---|---|
tools_enabled | 1 | 总开关;0 时所有功能不做自主探查 |
tools_triage … tools_detection | 空 | 按功能覆盖(triage / nl2spl / investigate / explain / detection);分诊对大批量会逐簇跑 SPL,慢时可单独关 |
max_tool_calls | 8 | 一轮里模型最多调多少次工具;到顶后工具返回「预算用完,用已有证据作答」。0 不限 |
budget_seconds | 120 | 一轮 agentic 的墙钟预算(功能自己设了超时的以功能为准) |
reflect_enabled / planner_enabled | 0 | splunklib.ai 的反思 / 规划,多一到两次往返,默认关 |
[threat_intel]
威胁情报工具默认关(enabled = 0)。查询会把原始 IP / 域名 / 哈希发给外部厂商,无法脱敏,所以 mode = cloud 时即使 enabled = 1 也不出网,除非 allow_cloud_egress = 1。endpoint 是带 {indicator} 占位的 URL 模板,allowed_hosts 是 SSRF 白名单,auth_header 是放 key 的头,key 存 storage/passwords(用户名 copilot_threatintel_api_key)。
[embeddings]
默认关。开了以后知识库按语义排序(同义改写也能命中),关键词检索仍作兜底。base_url / model / api_key(空则复用 LLM key)在 AI 配置页填,「测试连接」探出 dims 随保存写入。
[license_server]
| 键 | 默认 | 说明 |
|---|---|---|
app_id | rst_splunk_ai_copilot | 不要改 |
url | https://license.reallysec.com | 在线激活与心跳 |
offline_grace_days | 14 | 连不上许可服务器后还能用多少天 |
[audit_sinks]
审计事件本地永远写 index=_internal sourcetype=copilot:audit。这一节是可选的对外转发(只有元数据,不含日志原文和模型输出):syslog_url(tcp:// 或 tls://,不支持 UDP)、webhook_url + webhook_headers、tls_verify。转发失败只记日志,不影响请求。对应环境变量 RST_AUDIT_*。
运营层各节
| 节 | 键 | 说明 |
|---|---|---|
[baseline] | schedule_enabled = 0 | 每日基线巡检定时跑;规则写好再开 |
[usage] | monthly_token_budget = 0、token_prices、default_token_price、currency | 月度 token 预算告警(0 关)与成本显示;本地模型不配价格就只显示 token |
[platform] | license_warn_pct 等阈值 | 平台体检各项的告警 / 失败阈值 |
[spl_advisor] | verify_window = -24h | 改写前后结果数比对的时间窗 |
[onboard] | sample_rows = 50、dryrun_rows = 1000、default_app = search | 数据接入助手采样、试跑规模、写入目标 app |
[kb_sync] | enabled = 0、interval_hours = 24、kinds | 把本实例的 saved search / lookup / 宏 / 数据模型 / 仪表盘 / eventtype 同步进知识库 |
[noise] | fp_rate_threshold = 0.6、min_alerts = 10、days = 30、top_subjects = 5 | 告警降噪的 FP 率阈值与回看窗口 |
[tickets] | enabled = 1、allowed_hosts、timeout_seconds = 10、verify_tls = 1 | 工单出网策略;SaaS 域名默认放行,本地实例要列进 allowed_hosts |
[mcp] | enabled = 0、bind = 127.0.0.1、port = 18100 | MCP server;bind 只接受回环 / 0.0.0.0 / ::1 |
[onboarding] | demo_index = rst_copilot_demo | 演示数据落的索引 |
[solutions] | min_score = 0.78、min_sim = 0.25、cooldown_s = 300、top_k = 3 | 解法库作 few-shot 的相似度门槛(min_score 按 doubao-embedding-vision 实测校准:同义改写 0.81–0.85,无关 0.50–0.55) |
告警源
[alerts] index 默认读 notable(Enterprise Security)。没有 ES 的实例改成自己的告警索引;字段缺省映射:rule_name ← rule_name / search_name / sourcetype,urgency ← urgency(缺省 medium)。这一项也可以在实时告警页顶部改。