Skip to content

Conversation

@dr1nf3rn0
Copy link

@dr1nf3rn0 dr1nf3rn0 commented Jan 11, 2024

Description

  • Allows to configure pgpool2 prometheus exporter to use HTTPS endpoint

  • Allows to use basic authentication for pgpool2 prometheus exporter endpoint

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Motivation and Context

  • Current implementation lacks TLS support
  • Inspired by prometheus node_exporter TLS implementation https://github.com/prometheus/node_exporter
  • Prometheus Exporter Toolkit allows to share standard prometheus web configuration file format

Changes

  • Added official Prometheus Exporter Toolkit as dependency https://github.com/prometheus/exporter-toolkit

  • Added --web.config.file flag to exporter command line parameters. It specifies path to configuration file that can enable TLS or authentication. Configuration file conforms standard prometheus web configuration yaml file format

  • Updated REAMDE.MD flags and usage.

Other

  • Web config file configuration format specification: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md

  • Sample web-config.yml file format:

    # TLS and basic authentication configuration example.
    #
    # Additionally, a certificate and a key file are needed.
    tls_server_config:
        cert_file: server.crt
        key_file: server.key
    
    # Usernames and passwords required to connect.
    # Passwords are hashed with bcrypt: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md#about-bcrypt.
    basic_auth_users:
        alice: $2y$10$mDwo.lAisC94iLAyP81MCesa29IzH37oigHC/42V2pdJlUprsJPze
        bob: $2y$10$hLqFl9jSjoAAy95Z/zw8Ye8wkdMBM8c5Bn1ptYqP/AXyV0.oy0S8m
    
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant