Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

node_exporter filesystem collector can not read /proc/1/mounts #22

Open
omilun opened this issue May 13, 2019 · 8 comments
Open

node_exporter filesystem collector can not read /proc/1/mounts #22

omilun opened this issue May 13, 2019 · 8 comments

Comments

@omilun
Copy link
Contributor

omilun commented May 13, 2019

Hello i am using the node-exporter and it can not collect filesystem metrics .
Node-exporter log has an error :

level=error msg="ERROR: filesystem collector failed after 0.000074s: open /host/proc/1/mounts: permission denied" source="collector.go:132"

I don't have any problems with Node-exporter version 0.16 but new version (0.17) has this problem . Prometheus contributors solve this problem at latest version (0.18)

@wkulhanek
Copy link
Owner

@omilun I'm afraid I have no idea. I haven't used this repo in a while since Prometheus is now a part of OpenShift.

Are you running as a DaemonSet or natively?

@omilun
Copy link
Contributor Author

omilun commented May 13, 2019

Yes.I am using NodeExporter as a DaemonSet.

@wkulhanek
Copy link
Owner

Might be worthwhile trying a native deployment to ensure it's not something on the nodes rather the container.

@wkulhanek
Copy link
Owner

Can you try natively to see if this happens then, too? From a quick glance the hostpath mounts seem to give all necessary permissions.

@omilun
Copy link
Contributor Author

omilun commented May 14, 2019

I have solved this issue today.
node exporter needs a SCC users and enable security context privilege to yaml file. for version 0.17+

@wkulhanek
Copy link
Owner

Great. Mind sending me a pull request to fix this, please?

@omilun
Copy link
Contributor Author

omilun commented May 15, 2019

I just realized that your node-exporter.yaml and setup.sh already had the fix (privileged SCC).

Doesn't enabling privileged have security implications?!

@wkulhanek
Copy link
Owner

It does. But of course there are use cases where it's necessary. That's why SCCs exist. And a Node Exporter without full access to the host doesn't make a lot of sense. So it's OK to do it here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants