deadtrickster / prometheus.ex

Prometheus.io Elixir client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to remove entry with certain label

PhillippOhlandt opened this issue · comments

Hey,

I am using the Boolean Metric to produce something like this:

test_value{foo="bar"} 0
test_value{foo="baz"} 1

Now I no longer need test_value{foo="baz"} because baz was removed from the system. How can I remove it from the output?

Hi, Something like Boolean.remove(name: :test_value, labels: ["baz"]) should work
But if it was already ingested by prometheus it will stay anyway.

@deadtrickster Oh, I totally missed that function when I looked over the module.

But if it was already ingested by prometheus it will stay anyway.

That's fine. I just want the data point (graph) to stop and not show stale data.

Closing, feel free to reopen.