Files
pika/cmd/agent/agent.example.yaml
T

66 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Pika Agent 配置文件示例
# 配置文件默认路径: ~/.pika/agent.yaml
# 服务器配置
server:
# 服务器地址(不需要指定协议路径,会自动拼接)
# 例如: http://localhost:8080 或 https://your-server.com
endpoint: http://localhost:8080
# API Key(必填,从服务端获取)
api_key: "your-api-key-here"
# 是否跳过 TLS 证书验证(可选,默认: false)
# 警告: 仅用于测试环境或自签名证书,生产环境不建议开启
# 开启后会跳过服务器 HTTPS 证书的验证
insecure_skip_verify: false
# Agent 配置
agent:
# Agent 名称(可选,默认使用主机名)
# 用于在服务端区分不同的探针
name: ""
# 采集器配置
collector:
# 数据采集间隔(秒)
# 建议: 5-60 秒,太短会增加服务器负载
interval: 5
# 心跳间隔(秒)
# 建议: 30-120 秒
heartbeat_interval: 30
# 网络采集包含的网卡列表(白名单,支持正则表达式)
# 如果配置了此项,则只采集匹配的网卡,忽略 network_exclude
# 例如: ["^eth0$", "^en0$", "^ens.*"]
network_include: [ ]
# 网络采集排除的网卡列表(可选,支持正则表达式)
# 如果不配置,默认只排除回环地址(lo, lo0)
# 支持正则表达式匹配网卡名称
network_exclude:
- "^lo$" # 排除 lo 接口(回环地址)
- "^lo0$" # 排除 lo0 接口(回环地址)
- "^docker.*" # 排除所有 docker 开头的接口
- "^veth.*" # 排除所有 veth 开头的虚拟接口
- "^br-.*" # 排除所有 br- 开头的网桥接口
# 磁盘采集包含的挂载点列表(白名单)
# 如果为空,默认采集系统主分区(Linux/macOS: "/",Windows: "C:\")
# 例如:
# Linux/macOS: ["/", "/data", "/home"]
# Windows: ["C:", "D:"]
disk_include:
- "/" # 只采集根分区
# 自动更新配置
auto_update:
# 是否启用自动更新
# 启用后会定期检查服务端版本,有新版本时自动下载并更新
# 更新地址会自动从 server.endpoint 获取
enabled: true
# 检查更新间隔
check_interval: 10m