Skip to content

Gracefully handle small "idle" backward counter jumps #1903

@bmerry

Description

@bmerry

Host operating system: output of uname -a

  • Linux imgr15 4.15.0-74-generic Cut version 0.10.0. #83~16.04.1-Ubuntu SMP Wed Dec 18 04:56:23 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Linux imgr23 5.3.0-62-generic Add TCP state collector #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

Docker image prom/node-exporter:v1.0.1

node_exporter command line flags

Docker-compose config:

version: '2'
services:
  node-exporter:
    image: prom/node-exporter:v1.0.1
    command:
      - '--collector.textfile.directory=/textfile'
      - '--no-collector.zfs'
      - '--no-collector.wifi'
      - '--no-collector.bcache'
      - '--path.rootfs=/host'
      - '--collector.vmstat.fields=^(oom_kill|pgpg|pswp|nr|pg.*fault).*'
      - '--collector.filesystem.ignored-fs-types=^(tmpfs|autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|fuse.lxcfs|nfs|nsfs|ceph|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$$'
    network_mode: host
    pid: host
    volumes:
      - /var/spool/node-exporter:/textfile:ro
      - /:/host:ro,rslave

Are you running node_exporter in Docker?

Yes

What did you do that produced an error?

Ran node-exporter.

What did you expect to see?

No warning messages.

What did you see instead?

Lots of messages like

2020-11-29 06:29:28.518 imgr15.sdp.mkat.karoo.kat.ac.za node-exporter:   CPU Idle counter jumped backwards, possible hotplug event, resetting CPU stats
2020-11-29 18:35:02.572 imgr15.sdp.mkat.karoo.kat.ac.za node-exporter:   CPU Iowait counter jumped backwards

This was discussed on the mailing list here, but discussion died down so I'm opening a ticket so that it doesn't get lost. The jumps I see are all -0.01s; there is speculation that this is caused by some sort of race condition or the kernel accounting, and that for such small jumps one shouldn't reset, but rather export the highest value seen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions