refactor: separate monitoring from hardware plugins
This commit is contained in:
@@ -1,33 +1,12 @@
|
||||
# =============================================================================
|
||||
# PIGWay Pi Control v3.7.0 - 用户配置文件
|
||||
# =============================================================================
|
||||
#
|
||||
# 正式安装后的配置路径:
|
||||
# /etc/pigway-pi-control.conf
|
||||
#
|
||||
# 编辑:
|
||||
# sudo nano /etc/pigway-pi-control.conf
|
||||
#
|
||||
# 保存后让配置生效:
|
||||
# sudo systemctl restart pigway-pi-control
|
||||
#
|
||||
# 查看运行状态:
|
||||
# systemctl status pigway-pi-control --no-pager -l
|
||||
#
|
||||
# 查看实时日志:
|
||||
# journalctl -u pigway-pi-control -f
|
||||
#
|
||||
# 重要:
|
||||
# 1. 只建议修改本文件,不要直接修改 /usr/local/sbin/pigway-pi-control。
|
||||
# 2. “#” 开头是注释,不生效。要启用示例项,删除行首的 #。
|
||||
# 3. 数值单位和建议范围见每项上方注释。
|
||||
# 4. 配置写错导致服务无法启动时,可查看 journalctl 日志并修正本文件。
|
||||
# =============================================================================
|
||||
|
||||
# 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 必须唯一;修改后重启监控 Agent 和 API 服务。
|
||||
identifier = auto
|
||||
|
||||
# Web 页面显示名称。auto 表示使用 identifier。
|
||||
@@ -51,19 +30,10 @@ log_limit = 200
|
||||
|
||||
[timing]
|
||||
# 传感器采样周期,单位:秒。
|
||||
# CPU / 内存 / 温度 / 磁盘以及风扇控制按此周期更新。
|
||||
# CPU / 内存 / 温度 / 磁盘按此周期更新。
|
||||
# 推荐:1。通常不要低于 1。
|
||||
sensor_interval = 1
|
||||
|
||||
# OLED 当前页面刷新周期,单位:秒。
|
||||
# 这只是刷新当前页面数据,不负责切换页面。
|
||||
# 推荐:1。
|
||||
oled_refresh_interval = 1
|
||||
|
||||
# OLED 在主页和当前告警页之间轮播的周期,单位:秒。
|
||||
# 页面切换只影响 OLED;RGB 始终由当前 Display Owner 决定。
|
||||
page_interval = 10
|
||||
|
||||
# 网络状态检查周期,单位:秒。
|
||||
# 推荐:5。太短会产生不必要的网络探测。
|
||||
network_interval = 5
|
||||
@@ -74,45 +44,10 @@ service_interval = 5
|
||||
|
||||
# 本机健康检查周期,单位:秒。
|
||||
# 检查 Raspberry Pi 欠压/降频状态、根文件系统只读状态等。
|
||||
# 推荐:1。当前电源状态必须及时反映到 OLED/RGB;历史状态仅记录一次日志。
|
||||
# 推荐:1。当前电源状态及时更新告警与插件快照;历史状态仅记录一次日志。
|
||||
health_interval = 1
|
||||
|
||||
|
||||
[fan]
|
||||
# 风扇温控档位,单位:摄氏度。
|
||||
#
|
||||
# 默认曲线:
|
||||
# < 50°C OFF
|
||||
# 50~53°C L1
|
||||
# 53~56°C L2
|
||||
# 56~59°C L3
|
||||
# 59~62°C L4
|
||||
# >= 62°C MAX
|
||||
#
|
||||
# 如希望更安静,可适当提高阈值;如更重视散热,可降低。
|
||||
# 建议保持 start < level2 < level3 < level4 < max。
|
||||
|
||||
# 低于此温度,风扇完全停止。
|
||||
start = 50
|
||||
|
||||
# L2 起始温度;start 到 level2 之间为 L1。
|
||||
level2 = 53
|
||||
|
||||
# L3 起始温度。
|
||||
level3 = 56
|
||||
|
||||
# L4 起始温度。
|
||||
level4 = 59
|
||||
|
||||
# MAX 全速起始温度。
|
||||
max = 62
|
||||
|
||||
# 降档回差,单位:°C。
|
||||
# 防止温度在临界值附近上下波动时风扇频繁升降档。
|
||||
# 推荐:1.0~2.0。
|
||||
hysteresis = 1.5
|
||||
|
||||
|
||||
[alerts]
|
||||
# ---------------- CPU ----------------
|
||||
# CPU 使用率达到此百分比后开始累计高负载时间。
|
||||
@@ -152,7 +87,7 @@ disk_critical = 95
|
||||
# ---------------- Wi-Fi 信号 ----------------
|
||||
# 仅当 Wi-Fi 是 Linux 当前默认路由/主接口时生效。
|
||||
# RSSI 单位 dBm,越接近0越强;约 -50很好,-70一般,-80较弱。
|
||||
# 连续低于 wifi_weak 达到 wifi_weak_seconds 后触发蓝色告警。
|
||||
# 连续低于 wifi_weak 达到 wifi_weak_seconds 后触发弱信号告警。
|
||||
wifi_weak = -75
|
||||
|
||||
# 已告警后恢复到该值以上才解除,形成滞回避免反复闪烁。
|
||||
@@ -162,81 +97,6 @@ wifi_recover = -68
|
||||
wifi_weak_seconds = 30
|
||||
|
||||
|
||||
[led]
|
||||
# 正常运行、没有任何 active alert 时的 RGB 表现:
|
||||
# off = 全灭(默认,最安静且 I2C 写入最少)
|
||||
# solid = 三灯使用 normal_r/g/b 自定义颜色常亮
|
||||
# flash = 三灯使用 normal_r/g/b 和 normal_flash_*_ms 自定义颜色闪烁
|
||||
# flow = MCU 内置流水灯;使用有限颜色和速度
|
||||
# breathe = MCU 内置呼吸灯;使用有限颜色和速度
|
||||
# marquee = MCU 内置跑马灯;MCU 自行决定颜色变化
|
||||
# rainbow = MCU 内置彩虹灯;MCU 自行决定颜色变化
|
||||
# colorful = MCU 内置炫彩灯;MCU 自行决定颜色变化
|
||||
# 任何 active alert 都会立即抢占正常效果;全部恢复后才重新应用这里的模式。
|
||||
normal_mode = off
|
||||
|
||||
# solid / flash 自定义颜色,三通道范围均为 0..255。
|
||||
normal_r = 0
|
||||
normal_g = 0
|
||||
normal_b = 0
|
||||
|
||||
# flash 亮灯/灭灯时间,单位毫秒;范围 50..60000。
|
||||
normal_flash_on_ms = 1000
|
||||
normal_flash_off_ms = 1000
|
||||
|
||||
# MCU 内置效果速度:1=慢,2=中(默认),3=快。
|
||||
normal_effect_speed = 2
|
||||
# flow / breathe 可使用的 MCU 内置有限颜色:
|
||||
# red / green / blue / yellow / purple / cyan / white
|
||||
# marquee / rainbow / colorful 会忽略该颜色值。
|
||||
normal_effect_color = green
|
||||
|
||||
# DisplayController 按集中定义的 priority 仲裁 owner。告警页显示时 RGB 同步显示
|
||||
# 该页对象;主页使用最高优先级 active owner。颜色表示对象,速度表示严重等级:
|
||||
# CPU/频率/温度/散热 = 红色
|
||||
# 供电/欠压 = 橙色闪烁(实机校准,避免内置黄色偏绿)
|
||||
# 内存 = 紫色
|
||||
# 磁盘 = 白色
|
||||
# 网络/Wi-Fi = 蓝色
|
||||
# 服务/进程 = 青色
|
||||
# 颜色通道范围为 0..255。以下是本机实测后的默认值。
|
||||
cpu_r = 255
|
||||
cpu_g = 0
|
||||
cpu_b = 0
|
||||
power_r = 255
|
||||
power_g = 40
|
||||
power_b = 0
|
||||
memory_r = 255
|
||||
memory_g = 0
|
||||
memory_b = 255
|
||||
storage_r = 255
|
||||
storage_g = 255
|
||||
storage_b = 255
|
||||
network_r = 0
|
||||
network_g = 0
|
||||
network_b = 255
|
||||
service_r = 0
|
||||
service_g = 255
|
||||
service_b = 96
|
||||
|
||||
# 各严重等级可分别设置亮灯和灭灯时长,单位:毫秒,最小值 50。
|
||||
# 默认完整周期:Warning 3秒、Critical 1.5秒、Emergency 0.6秒。
|
||||
warning_flash_on_ms = 1500
|
||||
warning_flash_off_ms = 1500
|
||||
critical_flash_on_ms = 750
|
||||
critical_flash_off_ms = 750
|
||||
emergency_flash_on_ms = 300
|
||||
emergency_flash_off_ms = 300
|
||||
# 每次点亮使用 v3.2.0 已验证的 selector -> R -> G -> B 完整写入顺序,
|
||||
# 只在亮/灭边沿访问 MCU,不做高频软件 PWM。
|
||||
write_delay_ms = 10
|
||||
|
||||
# v3.3.0 RC 期间使用过的 brightness、*_breathe_seconds、rgb_update_ms、
|
||||
# warning_color、critical_color、warning_flash_ms、critical_flash_ms 和
|
||||
# emergency_flash_ms
|
||||
# 可以继续留在现有配置中;硬件灯效引擎会安全忽略它们。
|
||||
|
||||
|
||||
[dark_mode]
|
||||
# Raspberry Pi 4 板载 PWR / ACT LED。
|
||||
# 本机硬件只支持开/关,不支持真正的 PWM 调暗。
|
||||
|
||||
Reference in New Issue
Block a user