GithubHelp home page GithubHelp logo

patrickjahns / ansible-role-libvirt-exporter Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 37 KB

๐Ÿ”ง Ansible role for deploying libvirt-prometheus-exporter

License: MIT License

ansible ansible-role prometheus-exporter libvirt prometheus libvirtd exporter

ansible-role-libvirt-exporter's Introduction

libvirt-exporter

Build Status License Ansible Role GitHub tag

A ansible role that installs and configures libvirt-prometheus-exporter as system service

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

libvirt_exporter_version: 1.0.1

Install a specific version of libvirt-prometheus-exporter. Available versions are listered here.

libvirt_exporter_web_listen_address: "0.0.0.0:9233"

Address and port where the libvirt-prometheus-exporter service will listen on.

libvirt_exporter_uri: "qemu:///system"

The qemu/libvirt connection string - please refer to the official libvirt documentation for possible values

libvirt_exporter_system_group: "libvirt-exp"
libvirt_exporter_system_user: "{{ libvirt_exporter_system_group }}"

The user and group for the service. Please ensure that this group has access to libvirt socket if a local socket is used.

Dependencies

None.

Example Playbook

- hosts: all
  roles:
    - role: patrickjahns.libvirt_exporter
      vars:
        libvirt_exporter_system_group: libvirt
        libvirt_exporter_system_user: libvirt-exp

Local Testing

The preferred way of locally testing the role is to use Docker and molecule (v3.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable to for your system. We are using tox to simplify process of testing on multiple ansible versions. To install tox execute:

pip3 install tox

To run tests on all ansible versions (WARNING: this can take some time)

tox

To run a custom molecule command on custom environment with only default test scenario:

tox -e ansible29 -- molecule test -s default

For more information about molecule go to their docs.

If you would like to run tests on remote docker host just specify DOCKER_HOST variable before running tox tests.

Travis CI

Combining molecule and travis CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which will take more time than local testing, so please be patient.

License

This project is licensed under MIT License. See LICENSE for more details.

Maintainers and Contributors

ansible-role-libvirt-exporter's People

Contributors

patrickjahns avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ansible-role-libvirt-exporter's Issues

centos support

Hey there

Thank you very much for this Ansible role. Actually, it's exactly what I'm looking for... But unfortunately, also for the centos world.

There your exporter unfortunately does not start but throws the following message:

 $ /usr/local/bin/libvirt_exporter
Traceback (most recent call last):
  File "site-packages/libvirt.py", line 24, in <module>
ModuleNotFoundError: No module named 'cygvirtmod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "libvirt_exporter", line 3, in <module>
  File "/usr/local/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module
  File "libvirt_exporter/cli.py", line 3, in <module>
  File "/usr/local/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module
  File "libvirt_exporter/collector.py", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module
  File "site-packages/libvirt.py", line 28, in <module>
  File "site-packages/libvirt.py", line 20, in <module>
ImportError: /lib64/libc.so.6: version `GLIBC_2.22' not found (required by /tmp/_MEIhNCZjl/libdevmapper.so.1.02.1)
[628732] Failed to execute script libvirt_exporter

Stay healthy

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.