vSphere 模块
编辑vSphere 模块
编辑vSphere 模块使用 Govmomi 库从任何 VMware SDK URL (ESXi/VCenter) 收集指标。
此模块已针对 ESXi 和 vCenter 版本 5.5、6.0、6.5 和 7.0.3 进行了测试。
默认情况下,vSphere 模块启用以下指标集:
- cluster(集群)
- datastore(数据存储)
- datastorecluster(数据存储集群)
- host(主机)
- network(网络)
- resourcepool(资源池)
- virtualmachine(虚拟机)
支持的周期
编辑Datastore 和 Host 指标集支持使用 vSphere 性能 API 收集性能数据。鉴于性能 API 根据数据收集间隔施加使用限制,用户应优化配置周期以确保接收到实时数据。此配置可以根据数据收集间隔和数据收集级别确定。
只有主机和数据存储指标集受到 vSphere 实例配置的系统周期的限制。如果配置的实例不支持性能指标,用户仍然可以收集摘要指标。
实时数据收集默认间隔
编辑- 20 秒
历史数据收集默认间隔
编辑- 300 秒
- 1800 秒
- 7200 秒
- 86400 秒
示例
编辑如果需要配置具有不同周期的多个指标集,可以通过设置具有不同指标集的多个 vSphere 模块来实现,如下所示
- module: vsphere metricsets: - cluster - datastorecluster - network - resourcepool - virtualmachine period: 10s hosts: ["https://127.0.0.1/sdk"] username: "user" password: "password" insecure: false - module: vsphere metricsets: - datastore - host period: 300s hosts: ["https://127.0.0.1/sdk"] username: "user" password: "password" insecure: false
仪表板
编辑vSphere 模块包含一个预定义的仪表板。例如
vSphere 模块支持 模块中描述的标准配置选项。以下是一个示例配置
metricbeat.modules: - module: vsphere enabled: true metricsets: ["cluster", "datastore", "datastorecluster", "host", "network", "resourcepool", "virtualmachine"] # Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds by default. # Supported Periods: # The Datastore and Host metricsets support performance data collection using the vSphere performance API. # Since the performance API has usage restrictions based on data collection intervals, # users should ensure that the period is configured optimally to receive real-time data. # users can still collect summary metrics if performance metrics are not supported for the configured instance. # This configuration can be determined based on the Data Collection Intervals and Data Collection Levels. # Reference Links: # Data Collection Intervals: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-247646EA-A04B-411A-8DD4-62A3DCFCF49B.html # Data Collection Levels: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.monitoring.doc/GUID-25800DE4-68E5-41CC-82D9-8811E27924BC.html period: 20s hosts: ["https://127.0.0.1/sdk"] username: "user" password: "password" # If insecure is true, don't verify the server's certificate chain insecure: false # Get custom fields when using virtualmachine metricset. Default false. # get_custom_fields: false
以下指标集可用