scalair.ansible_vmware_exporter
Ansible 角色:VMware 导出器
安装和配置 VMware 导出器,这是一个由 Prometheus 使用的导出器。
要求
没有特殊要求;请注意,此角色需要根权限,因此必须以 become: yes
运行。
角色变量
可用的变量如下所示,以及默认值(参见 defaults/main.yml
):
vmware_exporter_port: 9272
vmware_exporter 的 HTTP 端点发布的端口。
vmware_exporter_targets: []
此变量包含 vmware_exporter 将连接的部分(vsphere 主机)的列表。 它基于 VMware 导出器 的配置文件,因此在设置此变量之前,请参考该文件。
下面的 '示例剧本' 或 defaults/main.yml
中提供了示例。
依赖关系
- 如果您使用的是 CentOS 或其他 Red Hat 衍生版,请使用 geerlingguy.repo-epel。
示例剧本
- hosts: vmware_exporter_servers
become: yes
vars:
vmware_exporter_targets:
- default:
vsphere_host: "vcenter"
vsphere_user: "user"
vsphere_password: "password"
ignore_ssl: False
collect_only:
vms: True
snapshots: True
vmguests: True
datastores: True
hosts: True
- limited:
vsphere_host: "slowvc.example.com"
vsphere_user: "[email protected]"
vsphere_password: "password"
ignore_ssl: True
collect_only:
vms: False
snapshots: False
vmguests: False
datastores: True
hosts: False
roles:
- role: geerlingguy.repo-epel
when: ansible_os_family == 'RedHat'
- scalair.vmware_exporter
许可证
Apache 许可证 2.0
作者信息
该角色由 Julien Delvecchio 于 2019 年创建。
关于项目
Ansible role that installs and configures prometheus vmware_exporter
安装
ansible-galaxy install scalair.ansible_vmware_exporter
许可证
apache-2.0
下载
117
拥有者
Public and private cloud operator