Giter Site home page Giter Site logo

ansible-role-prometheus's Introduction

Ansible Role: Prometheus (lrk.prometheus)

Build Status Galaxy Ansible Ansible Ansible

An Ansible Role that install Prometheus.

Supported OSes

  • Centos 7

Requirements

None

Role Variables

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

---
# defaults file for ansible-prometheus

# Prometheus variables

# Prometheus system user group
prometheus_group: prometheus
# Prometheus system user name
prometheus_user: prometheus

# Prometheus install path
prometheus_path_install: /opt/prometheus
# Prometheus configuration path
prometheus_path_config: /etc/prometheus
# Prometheus logs path
prometheus_path_log:  /var/log/prometheus
# Prometheus PID path
prometheus_path_pid:  /var/run/prometheus
# Prometheus Data path:
prometheus_path_data: /var/lib/prometheus
# Prometheus rules path:
prometheus_path_rules: "{{ prometheus_path_config}}/rules"
# Prometheus file sd config path:
prometheus_path_file_sd_config: "{{ prometheus_path_config}}/tgroups"

# Prometheus components to install
# Can be a mix of:
#   - prometheus
#   - node_exporter
#   - alertmanager
prometheus_components: []

# Set the jinja2 template file to use instead of the provided one. Path based on playbook_dir
prometheus_config_template: null

# Prometheus version
prometheus_version: 1.7.1

# Prometheus service name
prometheus_service_name: prometheus

# Address to bind on, default :9090
prometheus_listen_port: 9090
prometheus_listen_address: ':{{ prometheus_listen_port }}'

# Set the -web.external-url command line parameter. If defined, also set the -web.route-prefix command line parameter to /
# The URL under which Prometheus is externally reachable (for example, if Prometheus is served via a reverse proxy).
# Used for generating relative and absolute links back to Prometheus itself.
# If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Prometheus.
# If omitted, relevant URL components will be derived automatically.
# If set, also set
prometheus_web_external_url: null

# URL of alert manager service
prometheus_alertmanager_url: null

#Parameters for prometheus.yml

# Scrape interval: default 15s
prometheus_scrape_interval: 15s
# Scrape timeout: default 10s
prometheus_scrape_timeout: 10s
# Evaluation interval: default 15s
prometheus_evaluation_interval: 15s

# Alert manager variables

# Alert manager version
alertmanager_version: 0.8.0

# Alert manager service name
alertmanager_service_name: alertmanager

# Alert manager template path
alertmanager_path_templates: "{{ prometheus_path_config }}/templates"
# Alert manager data path
alertmanager_path_data: /var/lib/alertmanager

# ResolveTimeout is the time after which an alert is declared resolved if it has not been updated. default: 5m
alertmanager_resolve_timeout: 5m

# The default SMTP From header field. default empty
alertmanager_smtp_from: null
# The default SMTP smarthost used for sending emails. default empty
alertmanager_smtp_smarthost: null
# SMTP authentication information. default empty
alertmanager_smtp_auth_username: null
alertmanager_smtp_auth_password: null
alertmanager_smtp_auth_secret: null
alertmanager_smtp_auth_identity: null
# The default SMTP TLS requirement. default: false
alertmanager_smtp_require_tls: false

# Slack API url. default empty
alertmanager_slack_api_url: null

# Node exporter variables
nodeexporter_version: 0.14.0
# Node exporter service name
nodeexporter_service_name: nodeexporter_{{ inventory_hostname_short }}
# Node exporter listen address
nodeexporter_listen_port: 9100
nodeexporter_listen_address: ":{{ nodeexporter_listen_port }}"
# Collectors enables, comma-separated list of collectors to use. (default "conntrack,diskstats,entropy,edac,filefd,filesystem,hwmon,infiniband,loadavg,mdadm,meminfo,netdev,netstat,sockstat,stat,textfile,time,uname,vmstat,wifi,zfs")
nodeexporter_collectors_enabled: "conntrack,diskstats,entropy,edac,filefd,filesystem,hwmon,infiniband,loadavg,mdadm,meminfo,netdev,netstat,sockstat,stat,textfile,time,uname,vmstat,wifi,zfs"

Dependencies

None

Example Playbook

    - hosts: servers
      roles:
         - lrk.prometheus

License

Apache License Version 2.0

References

Author Information

This role was created by Lrk.

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.