# PIGWay system monitoring. Hardware plugins are separately installed. # 系统监控不依赖散热板;在 Web 的硬件插件页面确认接入后才发送状态。 [plugins] # No automatic attachment. Example (prefer Web discovery): # yahboom-cooling-hat = /run/pigway-plugins/yahboom-cooling-hat/api.sock [device] # 多机监控中使用的稳定机器标识。auto 表示读取本机 hostname。 # 多台机器的 identifier 必须唯一;修改后重启监控 Agent 和 API 服务。 identifier = auto # Web 页面显示名称。auto 表示使用 identifier。 name = auto [api] # 默认关闭远程 API。开启后所有请求均需令牌;本地监控和插件联动不受此开关影响。 enabled = false # API 监听地址和端口。0.0.0.0 允许局域网访问; # 如只允许本机访问可改为 127.0.0.1。修改后重启 API 服务生效。 bind = 0.0.0.0 port = 6001 log_limit = 200 [timing] # 传感器采样周期,单位:秒。 # CPU / 内存 / 温度 / 磁盘按此周期更新。 # 推荐:1。通常不要低于 1。 sensor_interval = 1 # 网络状态检查周期,单位:秒。 # 推荐:5。太短会产生不必要的网络探测。 network_interval = 5 # systemd 服务和自定义进程检查周期,单位:秒。 # 推荐:5。 service_interval = 5 # 本机健康检查周期,单位:秒。 # 检查 Raspberry Pi 欠压/降频状态、根文件系统只读状态等。 # 推荐:1。当前电源状态及时更新告警与插件快照;历史状态仅记录一次日志。 health_interval = 1 [alerts] # ---------------- CPU ---------------- # CPU 使用率达到此百分比后开始累计高负载时间。 cpu_high = 90 # CPU 降到此百分比以下,清除高负载累计。 cpu_recover = 75 # CPU 必须持续高负载多少秒才触发告警。 # 避免瞬时峰值造成误报。 cpu_high_seconds = 30 # ---------------- 内存 ---------------- # 内存使用率达到此百分比后开始累计。 memory_high = 90 # 内存降到此百分比以下,清除累计。 memory_recover = 85 # 持续多少秒才触发内存告警。 memory_high_seconds = 30 # ---------------- 温度 ---------------- # 温度普通告警阈值,单位:°C。 temp_high = 68 # 温度严重告警阈值,单位:°C。 temp_critical = 75 # ---------------- 磁盘 ---------------- # 根分区使用率达到此百分比触发普通告警。 disk_high = 90 # 根分区使用率达到此百分比触发严重告警。 disk_critical = 95 # ---------------- Wi-Fi 信号 ---------------- # 仅当 Wi-Fi 是 Linux 当前默认路由/主接口时生效。 # RSSI 单位 dBm,越接近0越强;约 -50很好,-70一般,-80较弱。 # 连续低于 wifi_weak 达到 wifi_weak_seconds 后触发弱信号告警。 wifi_weak = -75 # 已告警后恢复到该值以上才解除,形成滞回避免反复闪烁。 wifi_recover = -68 # 弱信号持续多少秒才正式告警。 wifi_weak_seconds = 30 [dark_mode] # Raspberry Pi 4 板载 PWR / ACT LED。 # 本机硬件只支持开/关,不支持真正的 PWM 调暗。 # # off = PIGWay Pi Control 启动时关闭该灯。 # 若不希望程序干预,可改为 on。 # # 注意: # 散热板上的 D1/D8 黄色硬件状态灯以及独立电源模块绿灯 # 不属于已确认的软件控制接口,本程序不会尝试操作。 pi_pwr_led = off pi_act_led = off [services] # ============================================================================= # systemd 服务监控(推荐) # ============================================================================= # # 格式: # OLED显示名称 = systemd真实unit名称 # # 左侧名称建议尽量短(OLED只有128×32)。 # 右侧必须是真实的 systemd unit。 # # 如何确认服务名: # systemctl status ssh.service # systemctl list-units --type=service # # 暂停监控: # 在该行最前面加 # # # 新增监控: # 直接增加一行,例如: # TAILSCALE = tailscaled.service # # 修改后: # sudo systemctl restart pigway-pi-control # # 默认监控 SSH 和向日葵核心后台服务。 SSH = ssh.service AWESUN = runawesun.service # 以下仅为示例,默认不启用: # TAILSCALE = tailscaled.service # DOCKER = docker.service # SAMBA = smbd.service # NGINX = nginx.service [service_monitor_disabled] # Web 中“暂停监控”的状态保存在这里。 # 名称对应 [services] 左侧名称;true 表示保留配置和备注,但 Agent 暂不检查。 # 通常由 Web 自动维护,无需手工编辑。 [processes] # ============================================================================= # 普通进程监控 # ============================================================================= # # 仅在程序没有 systemd service 时使用。 # 如果存在 systemd service,优先放到上面的 [services]。 # # 格式: # OLED显示名称 = pgrep -f 可以匹配到的进程关键字/命令行 # # 示例: # MYAPP = /opt/myapp/server # # 可以先在终端测试: # pgrep -af '/opt/myapp/server' # # 有输出说明匹配成功。 # # 示例默认全部注释,不会监控任何普通进程。 # MYAPP = /opt/myapp/server