https://www.robustperception.io/deleting-time-series-from-prometheus/
However, it's still true that you *were* monitoring those servers, and this
history may be useful You don't have to throw away the data. Just limit
your query like this:
max_over_time(up{instance=~"$instance",job="node_exporter"}[30d]) == 0 *and
up*
"up" is a metric that's always present for any scrape job, and absent if
not. So this query will filter out anything which is not actively being
scraped (within the last 5 minutes)
On Friday, 23 September 2022 at 12:25:51 UTC+1 [email protected] wrote:
> Hello All,
>
> I deleted some instances from the prometheus.yml file. But still, I am
> able to see those servers' historical data. What should I do so that those
> instances which I removed, those instances historical data should not have
> appeared?
>
> Example:
> I am finding the unreachable servers for 30 days
>
> *Query :*
> max_over_time(up{instance=~"$instance",job="node_exporter"}[30d]) == 0
>
> There are some servers that were unreachable for the last 30 days. Among
> these servers, I deleted a few of them from prometheus.yml. But still, I am
> able to see those servers in the output.
>
> What should I do so that I didn't get these servers' details?
>
> Thanks & regards,
> Bharath Kumar.
>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/ed751cf7-e8f1-4f14-b3c9-c75b24ae35fdn%40googlegroups.com.