Skip to content

Commit 2d06144

Browse files
committed
Add docs, Add missing \ in systemd unit file, change order in systemd unit file
1 parent c2346b7 commit 2d06144

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
2626
| `node_exporter_version` | 1.0.1 | Node exporter package version. Also accepts latest as parameter. |
2727
| `node_exporter_binary_local_dir` | "" | Allows to use local packages instead of ones distributed on github. As parameter it takes a directory where `node_exporter` binary is stored on host on which ansible is ran. This overrides `node_exporter_version` parameter |
2828
| `node_exporter_web_listen_address` | "0.0.0.0:9100" | Address on which node exporter will listen |
29+
| `node_exporter_web_telemetry_path` | "/metrics" | Path under which to expose metrics |
2930
| `node_exporter_enabled_collectors` | ```["systemd",{textfile: {directory: "{{node_exporter_textfile_dir}}"}}]``` | List of dicts defining additionally enabled collectors and their configuration. It adds collectors to [those enabled by default](https://github.com/prometheus/node_exporter#enabled-by-default). |
3031
| `node_exporter_disabled_collectors` | [] | List of disabled collectors. By default node_exporter disables collectors listed [here](https://github.com/prometheus/node_exporter#disabled-by-default). |
3132
| `node_exporter_textfile_dir` | "/var/lib/node_exporter" | Directory used by the [Textfile Collector](https://github.com/prometheus/node_exporter#textfile-collector). To get permissions to write metrics in this directory, users must be in `node-exp` system group. __Note__: More information in TROUBLESHOOTING.md guide.

defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
node_exporter_version: 1.0.1
33
node_exporter_binary_local_dir: ""
44
node_exporter_web_listen_address: "0.0.0.0:9100"
5+
node_exporter_web_telemetry_path: "/metrics"
56

67
node_exporter_textfile_dir: "/var/lib/node_exporter"
7-
node_exporter_telemetry_path: "/metrics"
88

99
node_exporter_tls_server_config: {}
1010

templates/node_exporter.service.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ ExecStart={{ _node_exporter_binary_install_dir }}/node_exporter \
2626
{% if node_exporter_tls_server_config | length > 0 or node_exporter_http_server_config | length > 0 or node_exporter_basic_auth_users | length > 0 %}
2727
--web.config=/etc/node_exporter/config.yaml \
2828
{% endif %}
29-
--web.telemetry-path={{ node_exporter_telemetry_path }}
30-
--web.listen-address={{ node_exporter_web_listen_address }}
29+
--web.listen-address={{ node_exporter_web_listen_address }} \
30+
--web.telemetry-path={{ node_exporter_web_telemetry_path }}
3131

3232
SyslogIdentifier=node_exporter
3333
Restart=always

0 commit comments

Comments
 (0)