文档文档

Proxmox 输入插件

此插件使用 Proxmox API 收集有关在 Proxmox 实例上运行的容器和虚拟机的信息。

引入版本: Telegraf v1.16.0 标签: server 操作系统支持: all

全局配置选项

插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md

配置

# Provides metrics from Proxmox nodes (Proxmox Virtual Environment > 6.2).
[[inputs.proxmox]]
  ## API connection configuration. The API token was introduced in Proxmox v6.2.
  ## Required permissions for user and token: PVEAuditor role on /.
  base_url = "https://:8006/api2/json"
  api_token = "USER@REALM!TOKENID=UUID"

  ## Node name, defaults to OS hostname
  ## Unless Telegraf is on the same host as Proxmox, setting this is required.
  # node_name = ""

  ## Additional tags of the VM stats data to add as a tag
  ## Supported values are "vmid" and "status"
  # additional_vmstats_tags = []

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

  ## HTTP response timeout (default: 5s)
  # response_timeout = "5s"

权限

插件需要有权访问 Proxmox API。在 Proxmox 中,API 令牌是相应用户的一部分。这意味着 API 令牌无法执行用户无法执行的命令。

对于 Telegraf,必须为 API 令牌和用户提供至少 /. 上的 PVEAuditor 角色。下面是创建 telegraf 用户和令牌,然后确保用户和令牌具有正确角色的示例

## Create a influx user with PVEAuditor role
pveum user add influx@pve
pveum acl modify / -role PVEAuditor -user influx@pve
## Create a token with the PVEAuditor role
pveum user token add influx@pve monitoring -privsep 1
pveum acl modify / -role PVEAuditor -token 'influx@pve!monitoring'

有关更多详细信息,请参阅此 Proxmox 文档示例

Metrics

  • proxmox
    • 标签 (tags)
      • node_fqdn - telegraf 运行所在节点的 FQDN
      • vm_name - VM/容器的名称
      • vm_fqdn - VM/容器的 FQDN
      • vm_type - VM/容器的类型 (lxc, qemu)
      • vm_id - VM/容器的 ID
    • 字段 (fields)
      • status
      • uptime
      • cpuload
      • mem_used
      • mem_total
      • mem_free
      • mem_used_percentage
      • swap_used
      • swap_total
      • swap_free
      • swap_used_percentage
      • disk_used
      • disk_total
      • disk_free
      • disk_used_percentage

示例输出

proxmox,host=pxnode,node_fqdn=pxnode.example.com,vm_fqdn=vm1.example.com,vm_id=112,vm_name=vm1,vm_type=lxc cpuload=0.147998116735236,disk_free=4461129728i,disk_total=5217320960i,disk_used=756191232i,disk_used_percentage=14,mem_free=1046827008i,mem_total=1073741824i,mem_used=26914816i,mem_used_percentage=2,status="running",swap_free=536698880i,swap_total=536870912i,swap_used=172032i,swap_used_percentage=0,uptime=1643793i 1595457277000000000

此页面是否有帮助?

感谢您的反馈!


InfluxDB 3.8 新特性

InfluxDB 3.8 和 InfluxDB 3 Explorer 1.6 的主要增强功能。

查看博客文章

InfluxDB 3.8 现已适用于 Core 和 Enterprise 版本,同时发布了 InfluxDB 3 Explorer UI 的 1.6 版本。本次发布着重于操作成熟度,以及如何更轻松地部署、管理和可靠地运行 InfluxDB。

更多信息,请查看

InfluxDB Docker 的 latest 标签将指向 InfluxDB 3 Core

在 **2026 年 2 月 3 日**,InfluxDB Docker 镜像的 latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。

如果使用 Docker 来安装和运行 InfluxDB,latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。例如,如果使用 Docker 运行 InfluxDB v2,请将 latest 版本标签替换为 Docker pull 命令中的特定版本标签 — 例如

docker pull influxdb:2