GithubHelp home page GithubHelp logo

classicvalues / ansible-role-prometheus-node-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ableton/ansible-role-prometheus-node-exporter

1.0 1.0 0.0 115 KB

Ansible role to install Prometheus' node_exporter application

License: MIT License

Jinja 46.16% Shell 8.69% Python 45.15%

ansible-role-prometheus-node-exporter's Introduction

Ansible role ableton.prometheus_node_exporter

This role installs Prometheus node_exporter as a service on the given host. If the target system has a package manager with the node_exporter package, then this role installs the software that way. Otherwise, the software will be built from sources.

Requirements

Ansible >= 2.10 is required. This role supports package-based installation on the following OS types:

  • Debian Linux (via the apt module)
  • macOS (via the homebrew module)
  • Windows (via the win_chocolatey module)

For all other platforms, a source-based installation will be performed. On such systems where package-based installation is not available, the following software is required:

  • Go (golang)
  • GNU Make

This role does not install either of the above software on the host; you must take care to do that before applying this role.

Role Variables

The following role variables are used for node_exporter's service configuration:

  • node_exporter_args: A list of arguments to pass to the node_exporter service, one argument per list item.
  • node_exporter_port: Port to expose metrics on.

The following variables are used when building node_exporter from sources.

  • node_exporter_install_from_binary: When true, node_exporter will be installed from a binary download and not via a package manager. This option is not supported on all system types (see the "Requirements" section above).
  • node_exporter_binary_arch: Binary architecture to fetch when downloading the node_exporter binary.
  • node_exporter_group: Group for the to run node_exporter_user.
  • node_exporter_user: User to run node_exporter as.
  • node_exporter_version: Version of node_exporter to install from source.

See the defaults/main.yml file for full documentation on required and optional role variables.

Example Playbook

---
- name: Install node_exporter on hosts
  hosts: "all"
  vars:
    node_exporter_port: 9100
    node_exporter_binary_arch: "amd64"
    node_exporter_group: "{{ ansible_user }}"
    node_exporter_user: "{{ ansible_user }}"
    node_exporter_version: "0.18.1"

  pre_tasks:
    - name: Force macOS hosts to install from source, so a specific version can be used
      set_fact:
        node_exporter_install_from_binary: true
      when: ansible_os_family == "Darwin"

    - name: Install prerequisite software for macOS hosts
      homebrew:
        name: golang
        state: present

  roles:
    - ableton.prometheus_node_exporter

License

MIT

Maintainers

This project is maintained by the following GitHub users:

ansible-role-prometheus-node-exporter's People

Contributors

nre-ableton avatar dependabot[bot] avatar rco-ableton avatar dgl-ableton avatar mst-ableton avatar

Stargazers

Classic Values avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.