Skip to content

Installs and configures node-exporter to expose node metrics to Prometheus on Redhat/Debian based hosts

License

Notifications You must be signed in to change notification settings

bilalcaliskan/node_exporter-ansible-role

Repository files navigation

Node Exporter Ansible Role

CI GitHub tag

Installs and configures Node exporter to expose node metrics to Prometheus on Redhat/Debian based hosts.

Requirements

This role has below requirements:

You can install suggested version with pip3:

$ pip3 install "ansible==2.9.16"

Note that this role requires root access, so either run it in a playbook with a global become: true, or invoke the role in your playbook.

Role Variables

See the default values in defaults/main.yml. You can overwrite them in vars/main.yml if neccessary or you can set them while running playbook.

Please note that this role can ensure that firewalld systemd service on your servers are started and enabled by default. If you want to start and enable firewalld service, please modify below variable as true while running playbook:

firewalld_enabled: true

Dependencies

None

Examples

Installation

- hosts: all
  become: true
  roles:
    - role: bilalcaliskan.node_exporter
      vars:
        exporter_port: 9092
        install_node_exporter: true
        version: 1.0.1

Uninstallation

- hosts: all
  become: true
  roles:
    - role: bilalcaliskan.node_exporter
      vars:
        install_node_exporter: false

Development

This project requires below tools for development:

After you install all the tools above, you can simply configure pre-commit by typing:

$ pre-commit install

License

Apache License 2.0

About

Installs and configures node-exporter to expose node metrics to Prometheus on Redhat/Debian based hosts

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages