
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
FRITZ!Box 智能家居 Prometheus 导出器用于将FRITZ!Box智能家居设备(如开关、电表、恒温器等)的信息导出到Prometheus监控系统,以便实现设备状态、能耗和环境参数的监控与分析。
适用于使用FRITZ!Box智能家居设备的用户,需要对设备运行状态、能源消耗、环境参数进行实时监控,并希望将数据集成到Prometheus和Grafana监控系统中,实现数据可视化和告警。
支持通过命令行参数或环境变量(参数名大写,如CERT对应-cert)进行配置:
| 参数 | 环境变量 | 描述 |
|---|---|---|
-cert | CERT | FRITZ!Box证书路径 |
-noverify | NOVERIFY | 跳过FRITZ!Box证书的TLS验证(默认false) |
-password | PASSWORD | FRITZ!Box密码 |
-url | URL | FRITZ!Box URL(默认[***] |
-username | USERNAME | FRITZ!Box用户名 |
使用docker run命令
bashdocker run -d --name fritzbox_smarthome_exporter -p 9103:9103 \ -v $(pwd)/boxcert.cer:/fritzbox.pem:ro \ -e PASSWORD=SuperSecret \ -e USERNAME=SmarthomeUser \ docker.xuanyuan.run/jaymedh/fritzbox_smarthome_exporter -url="https://fritz.box:8443" -cert=/fritzbox.pem
参数说明
-p 9103:9103:映射容器的9103端口到主机,用于访问/metrics端点-v $(pwd)/boxcert.cer:/fritzbox.pem:ro:挂载本地证书文件到容器内-e PASSWORD和-e USERNAME:设置FRITZ!Box的登录凭据-url和-cert:指定FRITZ!Box的URL和证书路径导出器通过/metrics端点提供以下指标:
# HELP fritzbox_battery_charge_level 电池电量百分比 # TYPE fritzbox_battery_charge_level gauge fritzbox_battery_charge_level{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 70 fritzbox_battery_charge_level{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440"} 100 # HELP fritzbox_batterylow 0表示电池正常,1表示电池电量低(此指标可靠性较低) # TYPE fritzbox_batterylow gauge fritzbox_batterylow{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 0 fritzbox_batterylow{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440"} 0 # HELP fritzbox_device_info 设备信息 # TYPE fritzbox_device_info gauge fritzbox_device_info{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200",functionbitmask="35712",fw_version="04.16",internal_id="16",manufacturer="AVM"} 1 fritzbox_device_info{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT",functionbitmask="320",fw_version="03.54",internal_id="21",manufacturer="AVM"} 1 fritzbox_device_info{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440",functionbitmask="1048864",fw_version="05.21",internal_id="26",manufacturer="AVM"} 1 # HELP fritzbox_device_present 设备是否连接(1=连接,0=未连接) # TYPE fritzbox_device_present gauge fritzbox_device_present{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 1 fritzbox_device_present{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 1 fritzbox_device_present{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440"} 1 # HELP fritzbox_energy 设备运行以来的累计能耗(单位:Wh) # TYPE fritzbox_energy gauge fritzbox_energy{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 339584 # HELP fritzbox_humidity_percent 相对湿度百分比 # TYPE fritzbox_humidity_percent gauge fritzbox_humidity_percent{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440"} 54 # HELP fritzbox_power 当前功率(单位:W),约每2分钟刷新一次 # TYPE fritzbox_power gauge fritzbox_power{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 0 # HELP fritzbox_switch_boxlock 是否禁用通过FRITZ!Box控制开关(1=禁用,0=启用,-1=未知或错误) # TYPE fritzbox_switch_boxlock gauge fritzbox_switch_boxlock{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 0 # HELP fritzbox_switch_devicelock 是否禁用通过设备控制开关(1=禁用,0=启用,-1=未知或错误) # TYPE fritzbox_switch_devicelock gauge fritzbox_switch_devicelock{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 0 # HELP fritzbox_switch_mode 开关模式(1=手动,0=自动,-1=未知或错误) # TYPE fritzbox_switch_mode gauge fritzbox_switch_mode{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 0 # HELP fritzbox_switch_state 开关状态(1=开,0=关,-1=未知或错误) # TYPE fritzbox_switch_state gauge fritzbox_switch_state{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 0 # HELP fritzbox_temperature 设备传感器测量的温度(单位:0.1°C) # TYPE fritzbox_temperature gauge fritzbox_temperature{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 20 fritzbox_temperature{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 19 fritzbox_temperature{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440"} 17.5 # HELP fritzbox_temperature_offset 用户设置的温度偏移(单位:0.1°C) # TYPE fritzbox_temperature_offset gauge fritzbox_temperature_offset{device_id="12345 0000001",device_name="SW_1",device_type="FRITZ!DECT 200"} 0 fritzbox_temperature_offset{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 0 fritzbox_temperature_offset{device_id="12345 0000007",device_name="BUTTON_1",device_type="FRITZ!DECT 440"} 0 # HELP fritzbox_thermostat_battery_charge_level 恒温器电池电量百分比 # TYPE fritzbox_thermostat_battery_charge_level gauge fritzbox_thermostat_battery_charge_level{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 70 # HELP fritzbox_thermostat_batterylow 0表示电池正常,1表示电池电量低(此指标可靠性较低) # TYPE fritzbox_thermostat_batterylow gauge fritzbox_thermostat_batterylow{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 0 # HELP fritzbox_thermostat_comfort 配置的舒适温度(单位:0.1°C) # TYPE fritzbox_thermostat_comfort gauge fritzbox_thermostat_comfort{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 19 # HELP fritzbox_thermostat_errorcode 恒温器错误代码(0=正常),详见https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf # TYPE fritzbox_thermostat_errorcode gauge fritzbox_thermostat_errorcode{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 0 # HELP fritzbox_thermostat_goal 用户设定的目标温度(单位:0.1°C) # TYPE fritzbox_thermostat_goal gauge fritzbox_thermostat_goal{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 16 # HELP fritzbox_thermostat_saving 配置的节能温度(单位:0.1°C) # TYPE fritzbox_thermostat_saving gauge fritzbox_thermostat_saving{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 16 # HELP fritzbox_thermostat_window_open 1表示检测到窗户打开(通常会关闭 heating),0表示未检测到 # TYPE fritzbox_thermostat_window_open gauge fritzbox_thermostat_window_open{device_id="12345 0000002",device_name="HKR_1",device_type="Comet DECT"} 0
示例Grafana仪表盘可在https://grafana.com/dashboards/7019%E8%8E%B7%E5%8F%96%E3%80%82
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务