1

I'm using Spring boot admin & trying to get mail notification whenever a service go down and other notification like messages on mobile-phones. I've tried some stuff but it didn't work.How should i do it?

G. Mehta
  • 11
  • 1
  • 4

1 Answers1

4

You just need to add a JavaMailSender to your SBA server. Easiest way is to use Spring Boot's mail starter and the AutoConfigurations so you just need those two steps:

(please configure your correct smtp-server and mail-reciever (maybe need credentials) !)

pom.xml:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
</dependency>

application.properties:

spring.mail.host=smtp.example.com
spring.boot.admin.notify.mail.to=admin@example.com

p.s. this is just taken from the documentation here: http://codecentric.github.io/spring-boot-admin/1.4.6/#mail-notifications

p.p.s there is no Notifier implementation for push messages to mobiles, in case you write one I would be interested in an PR on our GitHub project.

joshiste
  • 2,638
  • 1
  • 14
  • 19