Skip to content

namedprocess_namegroup_states Shows One Extra Thread #338

@vedha2709

Description

@vedha2709

Description:
The namedprocess_namegroup_states metric in process-exporter incorrectly displays one extra thread when the number of threads exceeds two digits. The total number of thread states should match namedprocess_namegroup_num_threads, but an extra thread is displayed when the thread count is 10 or more.

Expected Behavior:
The namedprocess_namegroup_states(all states, Running,Sleeping,Zombie,Other and Waiting) metric should match the total number of threads (namedprocess_namegroup_num_threads) precisely.

Actual Behavior:
namedprocess_namegroup_states displays one additional thread.
This issue occurs only in the Prometheus UI, while system metrics correctly report the number of threads and thread states.

Configuration:
Helm chart: https://mumoshu.github.io/prometheus-process-exporter
Version: 0.5.0
Image: ncabatoff/process-exporter
Tag: sha-626431b

Steps to Reproduce:

  1. Install process-exporter using the above Helm configuration.
  2. Enable {{.Cgroups}} in groups to get the container ID
    groups:
    • name: "{{.Cgroups}}"
      cmdline:
      • '.+'
        3.Run process-exporter to collect metrics for a process with a thread count greater than 10.
        4.Compare the values of namedprocess_namegroup_states and namedprocess_namegroup_num_threads.
  3. Observe that namedprocess_namegroup_states reports one additional thread.
    6.Verify the actual thread count on the system, which correctly matches namedprocess_namegroup_num_threads.

Screen shots:

Image Image Image Image

group Configuration:

Image

Looking forward to your insights and a possible fix. Thanks in advance for your help!
Please let me know if any additional details are required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions