You could look at the "up" metric, see when it appeared and when it disappeared. Obviously, this only works for whatever data retention period you have configured.
Similar question answered here: https://groups.google.com/g/prometheus-users/c/1zSp7XTbChY/m/3my54aefBwAJ On Monday, 10 April 2023 at 10:56:27 UTC+1 Shelten wrote: > How to achieve a target scrape duration, example, the machine was added so > and so date and removed from the scrape so and so date, so how to get the > time interval between them ? -- 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 prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/1d8f1b86-d563-4f0b-8acc-6bd495236197n%40googlegroups.com.