Coder Social home page Coder Social logo

node-exporter's Introduction

Node Exporter role

Installs standalone prometheus exporter, creates a new systemd service unit called node_exporter, and starts the service.

Example usage

  • Create a directory called roles, and clone this directory into it.
  • Create an inventory file with your hosts. In this example I'll call it "inventory"
  • Create a playbook, I'll call it "monitored.yml":
---
- hosts: '{{ target_hosts }}'
  roles:
    - node-exporter
  • Your working directory should like something like this:
.
├── inventory
├── monitored.yml
└── roles
    └── node-exporter
        ├── README.md
        ├── files
        │   ├── node_exporter-0.16.0.linux-amd64
        │   │   ├── LICENSE
        │   │   ├── NOTICE
        │   │   └── node_exporter
        │   └── node_exporter.service
        ├── tasks
        │   └── main.yml
        └── vars
            └── main.yml
  • Run the playbook. In this example, we're using password based authentication (-k) and privelege escalation (-K):
ansible-playbook -u sshuser -k -K -i inventory monitored.yml --extra-vars "target_hosts=all"

Environment

Tested on Ubuntu 16 and 18. Should work with distributions that use systemd. Note that python3 is distributed with these system. If there is no python at /usr/bin/python you can tell ansible to use /usr/bin/python3 instead. An easy way to do this is to set a variable in your inventory file:

[ubuntu_eighteen]
ubuntu18server1.exampledomain.org
ubuntu18server2.exampledomain.org

[ubuntu_eighteen:vars]
ansible_python_interpreter=/usr/bin/python3

node-exporter's People

Contributors

ihardy avatar

Watchers

 avatar  avatar  avatar  avatar

node-exporter's Issues

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.