Giter Club home page Giter Club logo

ansible-role-postgres_exporter's Introduction

ansible-role-postgres_exporter

Installs the PostgreSQL Exporter for Prometheus.

Build Status

Requirements

Requires Ansible role bdellegrazie.ansible-role-prometheus_exporter

Role Variables

Variable Description Default
postgres_exporter_version Version of the exporter to use 0.4.6
postgres_exporter_checksum checksum of the tarball sha1 checksum of 0.4.6 tarball
postgres_exporter_datasource DATASOURCE definition user=postgres host=/var/run/postgresql/ sslmode=disable
postgres_exporter_flags Array of Command line flags [e.g. '--extend.query-path="{{ postgres_exporter_home }}/queries.yml"']

The following option is always provided: -collector.textfile.directory /var/lib/postgres_exporter Ensures the textfile capability is enabled Other variables are in defaults/main.yml

Dependencies

`bdellegrazie.ansible-role-prometheus_exporter`

Example Playbook

- hosts: all
  roles:
    - { role: bdellegrazie.postgres_exporter }

License

GPLv3

Author Information

https://github.com/bdellegrazie/ansible-role-postgres_exporter

ansible-role-postgres_exporter's People

Contributors

bdellegrazie avatar mbee avatar vad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ansible-role-postgres_exporter's Issues

Update repo source from wrouesnel to prometheus-community

Per PR #16 the wrouesnel repo was absorbed into prometheus community some time ago. Please merge that change.

For those the wish to make it work in the meantime just set the following variables:

postgres_exporter_url: "https://github.com/prometheus-community/postgres_exporter/releases/download/v{{ postgres_exporter_version }}/{{ postgres_exporter_dist }}.tar.gz"
postgres_exporter_dist: postgres_exporter-{{ postgres_exporter_version }}.linux-amd64

Additionally, to use a more recent version than 0.8.0 [current default in this role] you will likely need to change to a different DSN format:

postgres_exporter_datasource: "postgresql://postgres@:5432/postgres?host=/var/run/postgresql/&sslmode=disable"

And, just for the sake of convenience, you can use the below to use the most recent exporter version as of this writing:

postgres_exporter_version: "0.11.1"
postgres_exporter_checksum: "sha256:ec27e2a52b764c4313076ea6db335607cc40fb8a503dcb74d9517dc8baf049f0"

Though you'll likely also need to override the queries.yml that ships with this role, as it is also outdated. You can get it from:

https://github.com/prometheus-community/postgres_exporter/blob/v0.11.1/queries.yaml

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.