geerlingguy.node_exporter

Ansible Role: Node Exporter

CI

This role installs the Node Exporter from Prometheus on Linux computers and sets up a systemd unit file to manage the service.

Note: If you are using Kubernetes, you can run Node Exporter as a DaemonSet instead of installing it on each node.

Requirements

None.

Role Variables

Here are the available variables along with their default values (check defaults/main.yml):

  • node_exporter_version: '0.18.1'
    • This specifies the version of Node Exporter you want to install. Check the tags in the Node Exporter repository for available versions. Remove the v from the version tag.

Changing the version will update the node_exporter binary and restart the service.

  • node_exporter_arch: 'amd64'

  • node_exporter_download_url: https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ node_exporter_arch }}.tar.gz

    • Defines the architecture and the download link for Node Exporter. If you're using a Raspberry Pi with Raspbian, change the arch value to armv7.
  • node_exporter_bin_path: /usr/local/bin/node_exporter

    • This is the installation path for the node_exporter binary.
  • node_exporter_host: 'localhost'

  • node_exporter_port: 9100

    • These define the host and port where Node Exporter will be available.
  • node_exporter_options: ''

    • Any extra options you want to pass to node_exporter on startup, like --no-collector.wifi to ignore WiFi data.
  • node_exporter_state: started

  • node_exporter_enabled: true

    • These control the Node Exporter service.

Dependencies

None.

Example Playbook

- hosts: all
  roles:
    - role: geerlingguy.node_exporter

License

MIT / BSD

Author Information

This role was created in 2020 by Jeff Geerling, the author of Ansible for DevOps.

Informazioni sul progetto

Prometheus' node_exporter for Linux hosts.

Installa
ansible-galaxy install geerlingguy.node_exporter
Licenza
mit
Download
340k
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns