spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

Unable to get notification when kubernetes service goes down

Open dakotamaker opened this issue 7 years ago • 1 comments

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: screen shot 2019-03-01 at 10 19 19 am.

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: screen shot 2019-03-01 at 10 21 44 am


screen shot 2019-03-01 at 10 22 31 am

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.

dakotamaker avatar Mar 01 '19 16:03 dakotamaker

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

joshiste avatar Mar 01 '19 22:03 joshiste