Installs and configures VMware exporter, an exporter used by Prometheus.
No special requirements; note that this role requires root access, so has to be ran with become: yes
Available variables are listed below, along with default values (see defaults/main.yml
):
vmware_exporter_port: 9272
The port on which the vmware_exporter http endpoint will be published.
vmware_exporter_targets: []
This variable contains a list of sections (vsphere hosts) that the vmware_exporter will connect to. It is based on the configuration file of the VMware exporter, so please refer to that before setting this variable.
Examples are provided below in 'Example Playbook' or in defaults/main.yml
.
- geerlingguy.repo-epel if you're using CentOS or a Red Hat derivative.
- 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: "administrator@vsphere.local"
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 License 2.0
This role was created in 2019 by Julien Delvecchio.