cloudalchemy / ansible-node-exporter

Provision basic metrics exporter for prometheus monitoring tool
MIT License
500 stars 272 forks source link

PreventHome works only if mount is directly under /home #271

Closed bmillemathias closed 1 year ago

bmillemathias commented 1 year ago

What happened? node-exporter is unable to do a statfs if a filesystem is mounted under a subdirectory of /home/ error reported

"msg="Error on statfs() system call" err="permission **denied"**

How to reproduce it (as minimally and precisely as possible): mount a filesystem under /home//foobar launch node-exporter get the aformentioned error

Environment linux, ubuntu 18.04

Anything else we need to know?: The bug is located at this place https://github.com/cloudalchemy/ansible-node-exporter/blob/master/templates/node_exporter.service.j2#L37 the test should be replaced with {% for m in ansible_mounts if m.mount.startswith('/home') %} at least it worked for me.

SuperQ commented 1 year ago

This role has been deprecated in favor of a the prometheus-community/ansible collection.