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

Commit

Permalink
Fix wrong size of /home shown by node-exporter (#87)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
laurvas authored and paulfantom committed Jun 5, 2019
1 parent b2365f2 commit 9e55b07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/node_exporter.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ SyslogIdentifier=node_exporter
Restart=always

PrivateTmp=yes
{% for m in ansible_mounts if m.mount == '/home' %}
ProtectHome=read-only
{% else %}
ProtectHome=yes
{% endfor %}
NoNewPrivileges=yes

{% if node_exporter_systemd_version | int >= 232 %}
Expand Down

0 comments on commit 9e55b07

Please sign in to comment.