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

Commit 9e55b07

Browse files
laurvaspaulfantom
authored andcommitted
Fix wrong size of /home shown by node-exporter (#87)
Node-exporter calculates wrong disk space if /home is a separate partition since systemd protects /home from it. Change protection to read-only if /home is a mountpoint. [minor] release
1 parent b2365f2 commit 9e55b07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

templates/node_exporter.service.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ SyslogIdentifier=node_exporter
2929
Restart=always
3030

3131
PrivateTmp=yes
32+
{% for m in ansible_mounts if m.mount == '/home' %}
33+
ProtectHome=read-only
34+
{% else %}
3235
ProtectHome=yes
36+
{% endfor %}
3337
NoNewPrivileges=yes
3438

3539
{% if node_exporter_systemd_version | int >= 232 %}

0 commit comments

Comments
 (0)