Node_exporter: Receiving "timex collector failed" with Node-Exporter v0.15.2

Created on 21 Feb 2018  路  8Comments  路  Source: prometheus/node_exporter

I'm running into a timex collector failed error I can't seem to figure out with node-exporter v0.15.2.

Host operating system: output of uname -a

Linux 40c691025ddf 4.9.75-moby #1 SMP Mon Jan 8 19:29:25 UTC 2018 x86_64 Linux

node_exporter version: output of node_exporter --version


v0.15.2

node_exporter command line flags

  swarm-exec docker container run \
  --volume="/proc:/host/proc:ro" \
  --volume="/sys:/host/sys:ro" \
  --volume="/:/rootfs:ro" \
  --publish=9100:9100 \
  --net="host" \
  --detach=true \
  --name=node-exporter \
  --restart=unless-stopped \
  $NODEEXPORTER_IMAGE \
    --path.procfs=/host/proc \
    --path.sysfs=/host/sys \
    --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"

Are you running node_exporter in Docker?


Yes

What did you do that produced an error?

Deployed Node-Exporter to Swarm Cluster

What did you expect to see?

No errors.

What did you see instead?

time="2018-02-21T21:24:13Z" level=error msg="ERROR: timex collector failed after 0.000015s: failed to retrieve adjtimex stats: operation not permitted" source="collector.go:123"

pendinclose requirfeedback

Most helpful comment

The option --pid="host" does not work, still has error log.
time="2018-03-22T11:17:55Z" level=error msg="ERROR: timex collector failed after 0.000029s: failed to retrieve adjtimex stats: operation not permitted" source="collector.go:123"

Use --cap-add=SYS_TIME option works for me.

All 8 comments

This is probably a syscall restriction enforced by docker. You probably need to run with --pid="host". this setting will also let you remove --volume=... and --path.... from your args.

The option --pid="host" does not work, still has error log.
time="2018-03-22T11:17:55Z" level=error msg="ERROR: timex collector failed after 0.000029s: failed to retrieve adjtimex stats: operation not permitted" source="collector.go:123"

Use --cap-add=SYS_TIME option works for me.

For anyone wondering, cap-add is a Docker argument, not a node_exporter argument. This took me a bit too long to figure out. 馃槉 The docker-compose syntax is:

    cap_add:
      - SYS_TIME

This fixed the error for me as well. 馃憤

Thanks for the pointer, I should update the README to include this.

@MartijnHols @panny-P What version of Docker do you have problems with? I do not get this error on 17.12.1-ce running on my QNAP NAS, or 18.03.1-ce on Ubuntu 16.04.

I'm setting things up on my experiments server which uses an old Scaleway Docker image, giving me Docker 17.05.0-ce on Ubuntu version 16.04.4 which is probably pretty modified by Scaleway. I'll try updating Docker.

cap_add is not required after reinstalling the server with the latest Docker image from Scaleway, giving me Docker 18.03.1-ce and the same Ubuntu version (but the install script is different so might be less or different bloatware).

I am using Node-Exporter v0.15.2 on Docker EE. i can see the Timex collector failed on node exporter logs after deploying the stack file. i have added below syntax to the docker stack file. while i am deploying stack file. It has output as -
Ignoring unsupported options: cap_add,

syntax:
cap_add:
- SYS_TIME

Do any one have the same issues ?

Was this page helpful?
0 / 5 - 0 ratings