grzegorznowak.query_exporter

Query Exporter Role for Ansible

Ansible Lint CI build CD build

Installs Query Exporter for Prometheus on Ubuntu using systemd.

Description

This role sets up the query exporter.

The Query Exporter requires at least Python 3.8, so it works best with recent Ubuntu versions.

Supported Distros

We will add support for more Linux distributions based on user feedback. Please share your needs in the issue tracker, and we will prioritize them.

Ubuntu Versions Supported

  • Ubuntu 20.04
  • Ubuntu 18.04

Installation

You can install it by either:

  • Running ansible-galaxy install grzegorznowak.query_exporter
  • Cloning the repository directly

Usage

Default Configuration Options

You can customize the settings by editing the default.yml file. Here are some variables you might want to change:

query_exporter_sources: https://github.com/albertodonato/query-exporter.git

# query_exporter_version: 2.7.0 (the latest tag fails integration tests)
# we use a specific commit that passes our tests:
query_exporter_version: 1e97d1cfbf803f9f70747d248ce16ec58268849f

query_exporter_port: 9560
query_exporter_web_listen_address: "127.0.0.1"

# logging is off by default; available options are: CRITICAL, ERROR, WARNING, INFO, DEBUG
query_exporter_logging_level: false

# we use the original query exporter format:
# https://github.com/albertodonato/query-exporter#configuration-file-format
# For more detail, check our tests' inventory file:
# inventory/molecule/group_vars/all.yml:17

query_exporter_configuration:
  databases: []
  metrics: []
  queries: []

Sample Playbook Using the Role

- name: Set Up Query Exporters
  hosts: all
  
  roles:
    - grzegorznowak.query_exporter

Integration Testing

Continuous Integration (CI) Pipeline

CI tests run on LXD using GitHub runners for every significant commit and merge to the main branch.

Local Testing on LXD

Make sure LXD is installed and set up.

Run the full test suite with ./test-local.sh.

Requirements

  • Ansible >= 2.7 (Older versions might work, but we can't guarantee that.)

License

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

Informazioni sul progetto

Prometheus Query Exporter

Installa
ansible-galaxy install grzegorznowak.query_exporter
Licenza
mit
Download
23.8k
Proprietario
Let's solve some more problems, shall we ?