It's probably more of a question than a problem, but i don't understand why it happens. When i run the node-exporter through docker stack deploy everything works fine, but when i'm trying to use it through docker service create it does not work and spills out the following error:
time="2020-07-04T03:07:13Z" level=info msg="Starting node_exporter (version=0.16.0, branch=HEAD, revision=d42bd70f4363dced6b77d8fc311ea57b63387e4f)" source="node_exporter.go:82" time="2020-07-04T03:07:13Z" level=info msg="Build context (go=go1.9.6, user=root@a67a9bc13a69, date=20180515-15:52:42)" source="node_exporter.go:83" time="2020-07-04T03:07:13Z" level=fatal msg="Couldn't create collector: failed to open sysfs: could not read /host/sys: stat /host/sys: no such file or directory" source="node_exporter.go:88"
It's probably more of a question than a problem, but i don't understand why it happens. When i run the node-exporter through docker stack deploy everything works fine, but when i'm trying to use it through docker service create it does not work and spills out the following error:
time="2020-07-04T03:07:13Z" level=info msg="Starting node_exporter (version=0.16.0, branch=HEAD, revision=d42bd70f4363dced6b77d8fc311ea57b63387e4f)" source="node_exporter.go:82" time="2020-07-04T03:07:13Z" level=info msg="Build context (go=go1.9.6, user=root@a67a9bc13a69, date=20180515-15:52:42)" source="node_exporter.go:83" time="2020-07-04T03:07:13Z" level=fatal msg="Couldn't create collector: failed to open sysfs: could not read /host/sys: stat /host/sys: no such file or directory" source="node_exporter.go:88"
docker-compose.yml (works):
docker service create (does not work, spilling out the mentioned error):
Docker version:
Docker version 19.03.8, build afacb8b7f0
Thanks in advance.