Welcome to the Linux Foundation Forum!

Lab 12.1 - Using Relabeling to Drop Samples

I added metric_relabel_configs as in example of Lab:

metric_relabel_configs:

  • action: keep
    source_labels: [name]
    regex: '(demo_|http_).*'

Reloads its configuration file

The prometheus continues showing other queries, not only started from demo_ or http_

However, when I changed action to drop, it worked well. Queries started from demo_ and http_ weren't showed in table.

prometheus-2.26.0

Anybody knows why action **keep **doesn't work?

Answers

  • froman
    froman Posts: 5

    I think the objective of the lab is the opposite of what you did. It uses keep to discard anything that does not begin with demo_ or http_.
    In your comment, you have deleted all metrics that begin with demo_ or http_ and keep everything else.

Categories

Upcoming Training