Skip to content

Commit 13a4c4c

Browse files
committed
fix: update postgres_exporter_web_* variables
1 parent b1298d0 commit 13a4c4c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Role Variables
3636
- `postgres_exporter_user` and `postgres_exporter_group` Unix username and group (default: `postgres`).
3737
- `postgres_exporter_install_path` Path to Postgres Exporter installation directory (default: `/usr/local/bin`).
3838
- `postgres_exporter_data_source_name` Accepts URI form and key=value form arguments. The URI may contain the username and password to connect with. (default: `user=postgres host=/var/run/postgresql/ sslmode=disable`).
39-
- `postgres_exporter_listen_address` Address to listen on for web interface and telemetry (default: `0.0.0.0`).
40-
- `postgres_exporter_listen_port` The port to bind to (default: `9182`).
41-
- `postgres_exporter_metrics_path` The path at which to serve metrics (default: `metrics`).
39+
- `postgres_exporter_web_listen_address` Address to listen on for web interface and telemetry (default: `0.0.0.0`).
40+
- `postgres_exporter_web_listen_port` The port to bind to (default: `9187`).
41+
- `postgres_exporter_web_telemetry_path` The path at which to serve metrics (default: `metrics`).
4242
- `postgres_exporter_disable_default_metrics` Use only metrics supplied from queries.yaml via `postgres_exporter_extend_query_path` (default: `false`).
4343
- `postgres_exporter_disable_settings_metrics` Use the flag if you don't want to scrape pg_settings (default: `false`).
4444
- `postgres_exporter_extend_query_path` Path to a YAML file containing custom queries to run. (default: `''`).

defaults/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ postgres_exporter_install_path: '{{ _postgres_exporter_install_path }}'
1616
postgres_exporter_data_source_name: '{{ _postgres_exporter_data_source_name }}'
1717

1818
# See available settings flags: https://github.com/prometheus-community/postgres_exporter#flags
19-
postgres_exporter_listen_address: '0.0.0.0'
20-
postgres_exporter_listen_port: 9187
21-
postgres_exporter_metrics_path: '/metrics'
19+
postgres_exporter_web_listen_address: '0.0.0.0'
20+
postgres_exporter_web_listen_port: 9187
21+
postgres_exporter_web_telemetry_path: '/metrics'
2222
postgres_exporter_disable_default_metrics: false
2323
postgres_exporter_disable_settings_metrics: false
2424
postgres_exporter_extend_query_path: ''

tasks/Win32NT/configure.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
- name: 'Windows | Set arguments'
1010
ansible.builtin.set_fact:
1111
_postgres_exporter_arguments: >-
12-
--web.listen-address {{ postgres_exporter_listen_address }}:{{ postgres_exporter_listen_port }}
13-
--web.telemetry-path {{ postgres_exporter_metrics_path }}
12+
--web.listen-address {{ postgres_exporter_web_listen_address }}:{{ postgres_exporter_web_listen_port }}
13+
--web.telemetry-path {{ postgres_exporter_web_telemetry_path }}
1414
{%- if postgres_exporter_disable_default_metrics | bool %} --disable-default-metrics {%- endif %}
1515
{%- if postgres_exporter_disable_settings_metrics | bool %} --disable-settings-metrics {%- endif %}
1616
{%- if postgres_exporter_extend_query_path | length > 0 %} --extend.query-path {{ postgres_exporter_extend_query_path }} {%- endif %}
@@ -43,7 +43,7 @@
4343
name: 'Postgres Exporter'
4444
description: 'Inbound rule for Postgres Exporter'
4545
program: '{{ postgres_exporter_install_path }}\postgres_exporter.exe'
46-
localport: '{{ postgres_exporter_listen_port }}'
46+
localport: '{{ postgres_exporter_web_listen_port }}'
4747
action: allow
4848
direction: in
4949
protocol: tcp

templates/postgres_exporter.service.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ User={{ postgres_exporter_user }}
1111
Group={{ postgres_exporter_group }}
1212
Environment="DATA_SOURCE_NAME={{ postgres_exporter_data_source_name }}"
1313
ExecStart={{ postgres_exporter_install_path }}/postgres_exporter \
14-
--web.listen-address {{ postgres_exporter_listen_address }}:{{ postgres_exporter_listen_port }} \
15-
--web.telemetry-path {{ postgres_exporter_metrics_path }} \
14+
--web.listen-address {{ postgres_exporter_web_listen_address }}:{{ postgres_exporter_web_listen_port }} \
15+
--web.telemetry-path {{ postgres_exporter_web_telemetry_path }} \
1616
{% if postgres_exporter_disable_default_metrics | bool %}
1717
--disable-default-metrics \
1818
{% endif %}

0 commit comments

Comments
 (0)