Skip to content
This repository was archived by the owner on Nov 12, 2023. It is now read-only.

Commit 36fae5e

Browse files
committed
chore: add env pushgateway_web_external_url in default config and systemd template
1 parent 960f611 commit 36fae5e

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
2222
| -------------- | ------------- | -----------------------------------|
2323
| `pushgateway_version` | 0.9.1 | Node exporter package version |
2424
| `pushgateway_web_listen_address` | "0.0.0.0:9091" | Address on which node exporter will listen |
25+
| `pushgateway_web_external_url` | "" | External address on which pushgateway is available. Useful when behind reverse proxy. Ex. http://example.org/pushgateway |
2526
| `pushgateway_persistence` | true | Enable persistence file |
2627
| `pushgateway_config_flags_extra` | {} | Additional configuration flags passed at startup to pushgateway binary |
2728

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
pushgateway_version: 0.9.1
33
pushgateway_web_listen_address: "0.0.0.0:9091"
4+
pushgateway_web_external_url: ""
45

56
pushgateway_persistence: true
67

templates/pushgateway.service.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Group={{ pushgateway_system_group }}
1111
ExecStart=/usr/local/bin/pushgateway \
1212
{% if pushgateway_persistence %}
1313
--persistence.file="{{ pushgateway_persistence_dir }}/persistence" \
14+
{% endif %}
15+
{% if pushgateway_web_external_url %}
16+
--web.external-url="{{ pushgateway_web_external_url }}" \
1417
{% endif %}
1518
--web.listen-address={{ pushgateway_web_listen_address }}{% for flag, flag_value in pushgateway_config_flags_extra.items() %}\
1619
--{{ flag }}{% if flag_value %}={{ flag_value }}{% endif %} {% endfor %}

0 commit comments

Comments
 (0)