Giter Club home page Giter Club logo

ansible-mongodb-exporter's Introduction

williamyeh.mongodb_exporter for Ansible Galaxy

Circle CI Build Status

Summary

Role name in Ansible Galaxy: williamyeh.mongodb_exporter

This Ansible role has the following features for mongodb_exporter (a MongoDB metrics exporter for Prometheus):

  • Install mongodb_exporter by compiling its Golang source code (I hope the maintainer of mongodb_exporter will provide official binary releases).
  • Handlers for restart/reload/stop events.

NOTE: If you want to install Prometheus itself or other exporters, see williamyeh.prometheus for more info.

Role Variables

Mandatory variables

None.

Optional variables

Mongodb_exporter specific user-configurable defaults:

# MongoDB Connection String URI
# @see http://docs.mongodb.org/manual/reference/connection-string/
mongodb_exporter_mongodb_uri:  "mongodb://localhost:27017"

If the Linux distributions are equipped with systemd, this role will use this mechanism accordingly. You can disable this (i.e., use traditional SysV-style init script) by defining the variable to false: mongodb_exporter_use_systemd: false.

mongodb_exporter_use_systemd

Prometheus user-configurable defaults (of course, a subset of optional variables in williamyeh.prometheus):

# user and group
prometheus_user:   prometheus
prometheus_group:  prometheus


# directory for executable files
prometheus_install_path:   /opt/prometheus

# directory for logs
prometheus_log_path:       /var/log/prometheus

# directory for PID files
prometheus_pid_path:       /var/run/prometheus


# version of helper utility "gosu"
gosu_version:  1.9

Handlers

  • restart mongodb_exporter

  • reload mongodb_exporter

  • stop mongodb_exporter

Usage

Step 1: add role

Add role name williamyeh.mongodb_exporter to your playbook file.

Step 2: add variables

Set vars in your playbook file, if necessary.

Simple example:

---
# file: simple-playbook.yml

- hosts: all
  become: True
  roles:
    - williamyeh.mongodb_exporter

  vars:

    mongodb_exporter_mongodb_uri:  "mongodb://adm:password@localhost:27017"

Dependencies

None.

License

MIT License. See the LICENSE file for details.

ansible-mongodb-exporter's People

Contributors

william-yeh avatar

Watchers

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