Unable to get notification when kubernetes service goes down
Problem Description:
Currently my situation is that I have different SpringBoot applications running in kubernetes and I am trying to monitor their health using Spring Boot Admin. When a service goes down I have configured a a SendGrid server to send me an email via spring-boot-starter-mail.
However, the issue I'm running into is that for spring-boot-admin I am using the spring.boot.admin.discovery.services property to whitelist which services are auto-discovered and when I kill the java process in that service or scale down to have 0 pods the services just go off and their status goes from "REGISTERED" to "DEREGISTERED" in the "Journal" section of the UI:
.
So instead of getting an email and the health check failing my Spring Boot Admin UI just removes the service from the list of services until a new pod spins up:


Area of assistance needed: Mostly just wondering if this is a limitation of spring-boot-admin and/or the usage of the auto-discovery in this case, and some help going forward with that so that I can more confidently monitor these services.
When an application is deregistered, it won't be reported as offline as no one misses it.
However, you could extend InstanceDiscoveryListener and override the removeStaleInstances() to customize the behaviour...
Also there is already a feature request to check for minimum instances