Giter Club home page Giter Club logo

ansible-role-vmware-exporter's Introduction

Ansible Role: VMware Exporter

ubuntu-18 ubuntu-20 debian-9 debian-10

License GitHub issues GitHub tag GitHub action

Description

Deploy and manage prometheus VMware exporter using ansible.

Requirements

  • Ansible >= 2.9 (It might work on previous versions, but we cannot guarantee it)

Role Variables

All variables which can be overridden are stored in defaults/main.yml file as well as in table below.

Name Default Value Description
proxy_env {} Proxy environment variables
vmware_exporter_web_listen_port 9272 Exporter port
vmware_exporter_config_dir /etc/vmware_exporter Configuration folder
vmware_exporter_binary_local_dir /usr/local/bin Exporter binary path
vmware_exporter_create_consul_agent_service true Add consul-agent service snipped
vmware_exporter_system_user prometheus Exporter running user
vmware_exporter_system_group prometheus Exporter running group
vmware_exporter_targets {} vCenter targets (see defaults/main.yml)

Example Prometheus config

# You can use the following parameters in the Prometheus configuration file. The params section is used to manage multiple login/passwords.
- job_name: 'vmware_vcenter'
  metrics_path: '/metrics'
  static_configs:
    - targets:
      - 'vcenter.company.com'
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: localhost:9272

- job_name: 'vmware_esx'
  metrics_path: '/metrics'
  file_sd_configs:
    - files:
      - /etc/prometheus/esx.yml
  params:
    section: [esx]
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: localhost:9272

# Example of Multiple vCenter usage per #23
- job_name: vmware_export
    metrics_path: /metrics
    static_configs:
    - targets:
      - vcenter01
      - vcenter02
      - vcenter03
    relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: exporter_ip:9272

Playbook

- hosts: all
  become: yes
  roles:
    - onkeldom.vmware_exporter

Contributing

See contributor guideline.

License

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

ansible-role-vmware-exporter's People

Contributors

onkeldom 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.