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

Prometheus continues to scrape removed targets from empty scrape configs #4812

Closed
grobie opened this Issue Oct 31, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@grobie
Copy link
Member

grobie commented Oct 31, 2018

Bug Report

What did you do?

Removed last entry of a static_configs directive. Our template generator omits empty config blocks from being written out to disk. The written out scrape configuration didn't have any *_sd_configs or static_configs configuration block.

What did you expect to see?

Either Prometheus rejects scrape configurations without a single discovery config (neither static nor any *_sd_configs), or it handles such empty scrape configurations correctly.

What did you see instead? Under which circumstances?

Prometheus didn't show any targets in the targets page, but continued to scrape the target from the last static_configs (with up == 0 as the target was deprovisioned).

Environment

  • System information:

    Linux 4.18

  • Prometheus version:

    2.4.2

@krasi-georgiev

@grobie grobie changed the title Prometheus continues to scrape removed targets Prometheus continues to scrape removed targets from empty scrape configs Oct 31, 2018

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Oct 31, 2018

I'll have a look at it.

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Oct 31, 2018

Hmm it seems even worse with master (and the future 2.5) as it doesn't even remove the scrape configuration from the targets page when the last target is removed. It isn't "worse", it is just that the bug is less hidden.

Edit: same behavior with 2.3 too.

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.