
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Prometheus Proxmox VE Exporter是一款从Proxmox VE节点收集信息并供Prometheus监控系统使用的导出器。它支持多种收集器(状态、版本、节点、集群、资源、配置等),可通过Docker便捷部署,适用于监控Proxmox VE集群的运行状态、资源使用及版本信息等。
注意:自2.0.0版本起不再支持Python 2,请使用Python 3.6或更高版本。
shellpython3 -m pip install prometheus-pve-exporter
shelldocker pull docker.xuanyuan.run/prompve/prometheus-pve-exporter
示例:显示使用帮助信息
shelldocker run -it --rm docker.xuanyuan.run/prompve/prometheus-pve-exporter --help
示例:运行容器(挂载配置文件并发布端口)
shelldocker run --name prometheus-pve-exporter -d -p 127.0.0.1:9221:9221 -v /path/to/pve.yml:/etc/pve.yml docker.xuanyuan.run/prompve/prometheus-pve-exporter
运行后,可通过 http://localhost:9221/ 访问Prometheus PVE Exporter。
usage: pve_exporter [-h] [--collector.status] [--collector.version] [--collector.node] [--collector.cluster] [--collector.resources] [--collector.config] [config] [port] [address] 位置参数: config 配置文件路径(pve.yml) port 导出器监听端口(默认9221) address 导出器绑定地址 可选参数: -h, --help 显示帮助信息并退出 --collector.status, --no-collector.status 暴露节点/虚拟机/容器状态(默认:启用) --collector.version, --no-collector.version 暴露PVE版本信息(默认:启用) --collector.node, --no-collector.node 暴露PVE节点信息(默认:启用) --collector.cluster, --no-collector.cluster 暴露PVE集群信息(默认:启用) --collector.resources, --no-collector.resources 暴露PVE资源信息(默认:启用) --collector.config, --no-collector.config 暴露PVE开机启动状态(默认:启用)
在双栈机器上,使用::作为address参数可同时绑定IPv6和IPv4套接字。访问 http://localhost:9221/pve?target=1.2.3.4 获取指标(其中1.2.3.4为Proxmox VE节点IP)。可通过module请求参数指定配置文件中的模块。若导出器直接部署在Proxmox主机上,target参数默认为localhost,可省略。
注意:
config收集器会对每个客户机VM/容器发起一次API调用,大规模部署中建议使用--no-collector.config禁用该收集器。
yamldefault: user: prometheus@pve # PVE用户名 password: sEcr3T! # 对应密码
yamldefault: user: prometheus@pve # PVE用户名 token_name: "..." # 令牌名称 token_value: "..." # 令牌值
配置直接传递给proxmoxer.ProxmoxAPI()。若Proxmox VE使用自签名证书,需将证书导入本地信任存储(Debian/Ubuntu可参考https://askubuntu.com/a/***),或在凭据同级添加`verify_ssl: false`。PVE默认支持Let's Encrypt,建议优先配置可信证书。
为安全起见,需创建具有只读访问权限(PVEAuditor角色)的用户用于指标收集。
yamlscrape_configs: - job_name: 'pve' static_configs: - targets: - 192.168.1.2:9221 # 运行PVE导出器的Proxmox VE节点 - 192.168.1.3:9221 # 运行PVE导出器的Proxmox VE节点 metrics_path: /pve params: module: [default]
yamlscrape_configs: - job_name: 'pve' static_configs: - targets: - 192.168.1.2 # Proxmox VE节点IP - 192.168.1.3 # Proxmox VE节点IP metrics_path: /pve params: module: [default] relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 127.0.0.1:9221 # PVE导出器地址
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务