Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Unhealthy' Targets filter not filtering out all 'Healthy' Targets #5219

Open
smarch2 opened this Issue Feb 14, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@smarch2
Copy link

smarch2 commented Feb 14, 2019

Proposal

Use case. Why is this important?
When selecting 'Unhealthy' on the Targets Page, Jobs are only hidden if all the Targets within that Job are 'Healthy'. If a Job contains many Targets but only contains one 'Unhealthy' Target, all the 'Healthy' Targets will still be visible.
It would be more manageable and user friendly, in particular when there are many Targets, to only show the 'Unhealthy' Targets.

This was touched upon in #4319.

I have coded a fix for this, if seen as beneficial, I will submit a Pull Request for review.

Bug Report

What did you do?
Filter the Targets by 'Unhealthy' on the Targets Page.

all

What did you expect to see?
Only 'Unhealthy' Targets visible (Prometheus job gets hidden).

hidinghealthy

What did you see instead? Under which circumstances?
All the other 'Healthy' Targets within a Job that contains 'Unhealthy' Targets (Prometheus job is hidden, but still the 'Healthy' Targets in example-random are visible).

nothidinghealthy

Environment

  • System information:
Linux 3.10.0-957.5.1.el7.x86_64 x86_64
  • Prometheus version:
prometheus, version 2.7.1 (branch: master, revision: fd964426a77a5fc64db02b2ff5b757045b80be7a)
build date:       20190205-13:26:52
go version:       go1.11.4
  • Prometheus configuration file:

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['localhost:9090']

  - job_name: 'node_exporter'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['localhost:9100']


  - job_name: 'example-random'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s

    static_configs:
        - targets: ['localhost:8080', 'localhost:8081', 'localhost:8082', 'localhost:8083']
          labels:
            group: 'production'

        - targets: ['localhost:8084', 'localhost:8085', 'localhost:8086', 'localhost:8087']
          labels:
            group: 'canary'

@codesome

This comment has been minimized.

Copy link
Member

codesome commented Feb 17, 2019

@smarch2 this looks good. If you have the patch ready, can you go ahead and open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.