lpwoodhouse.windows_exporter

Ansible Role: Windows Exporter

Ansible Role GitHub tag License

Description

Downloads, installs and configures Windows Exporter for Windows.
Similar to node_exporter for Linux machines, windows-exporter exposes hardware and OS metrics on Windows machines for scraping by Prometheus.
This role configures windows-exporter for use with the Grafana Windows-Exporter-Dashboard (ID: 14694)

Requirements

Ansible modules from the collections below are utilized. Ensure there is a requirements file if they are not already available.

# Example /roles/requirements.yml
---
collections:
  - community.windows
  - ansible.windows

Role Variables

The values for default variables are listed below (see defaults/main.yml). Ensure they are overwritten with the values you require. See here for guidence on variable placement.

# The release version of windows_exporter to download (e.g. latest, 0.19.0, 0.16.0)
# Not required if installing from an existing installer on either local or remote host
_windows_exporter_version: latest

# The path (on local or remote host) to an existing .msi installer for installing windows_exporter
# Must be blank quotes "" if the file is to be downloaded
_windows_exporter_msi_path: ""
# Must be true if the windows exporter .msi path is on the remote host and false is the path is on localhost
_windows_exporter_msi_remote_src: true

# The directory on the remote host to where the windows exporter .msi installer will be downloaded or copied to
_windows_exporter_download_dir: 'C:\Windows\Temp'

Dependencies

None

Example Playbook

- hosts: all
  roles:
   - lpwoodhouse.windows_exporter

Author Information

Created in 2022 by Lee Woodhouse.

Linkedin Badge Reddit Badge Twitter Follow

About

This role downloads, installs and configures Windows Exporter for Windows.

Install
ansible-galaxy install lpwoodhouse.windows_exporter
GitHub repository
License
mit
Downloads
152
Owner
Principal Systems Engineer from 🇬🇧 now based in 🌴 Hawaii. Passionate about 🖥️ homelab builds, 🏠 self-hosting, and 🤖 automation.