Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Spring IO 2018 - Monitoring Spring Boot Applica...
Search
Johannes Edmeier
May 24, 2018
Programming
3.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spring IO 2018 - Monitoring Spring Boot Applications with Spring Boot Admin
Johannes Edmeier
May 24, 2018
More Decks by Johannes Edmeier
See All by Johannes Edmeier
Java User Group - Spring Boot Admin
joshiste
0
280
Other Decks in Programming
See All in Programming
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
440
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.4k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
330
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
250
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.5k
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
470
自作OSでスライド発表する
uyuki234
1
3.9k
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
110
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
えっ!!コードを読まずに開発を!?
hananouchi
0
220
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Tell your own story through comics
letsgokoyo
1
1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
260
Large-scale JavaScript Application Architecture
addyosmani
515
110k
エンジニアに許された特別な時間の終わり
watany
108
250k
A Tale of Four Properties
chriscoyier
163
24k
Speed Design
sergeychernyshev
33
1.9k
Mobile First: as difficult as doing things right
swwweet
225
10k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Transcript
Spring Boot Admin 1 Johannes Edmeier @joshiste
2
Setting things up (demo time) 3
4 Setting up the SBA Server (1) 1. Generate web
project using Spring Initializr $ curl https://start.spring.io/starter.tgz \ -d dependencies=web,\ codecentric-spring-boot-admin-client,\ codecentric-spring-boot-admin-server \ | tar -xzvf -
5 Setting up the SBA Server (2) @EnableAdminServer @SpringBootApplication public
class AdminServerApplication { ... } 2. Import Configuration to the Application
6 Register client applications (1) <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>2.0.0</version> </dependency>
1. Add dependency
7 Register client applications (2) spring.boot.admin.client.url=http://localhost:8081 management.endpoints.web.exposure.include=* management.endpoint.health.show-details=always 2. Configure
SBA Server localtion and expose endpoints
8 Easy client tweaks spring.application.name=spring-petclinic logging.file=target/petclinic.log info.sources=https://github.com/spring-projects/spring-petclinic <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>
<executions> <execution> <goals> <goal>build-info</goal> </goals> </execution> </executions> </plugin>
9 alternatively use Eureka, Consul, Zookeeper, static config … or
any other Spring Cloud Discovery Client Register client applications
10 alternatively use Eureka, Consul, Zookeeper, static config … or
any other Spring Cloud Discovery Client Register client applications Postponed to 2.0.1 (snapshot available)
Behind the Scenes 11
12 SBA Client SBA Server client registers periodically via http
post
13 SBA Client SBA Server server polls health endpoint via
http … monitoring non-Boot applications is possible (just health checking)
14 Notifications HipChat eMail … or implement your own …
simply configured via properties
15 SBA Client server forwards requests to clients (using zuul)
SBA UI SBA Server … clients must expose actuator endpoints using http
16 … can be implemented using Spring Security e.g. Basic
Auth, JWT, session based, … … custom headers can be injected implementing a HttpHeadersProvider Security
17 Customization – HttpHeadersProvider @Bean public HttpHeadersProvider injectHeaders() { return
instance -> { HttpHeaders headers = new HttpHeaders() headers.set("X-CUSTOM", "1234567"); return headers; }; }
18 Customization - InstanceExchangeFilterFunction @Bean public InstanceExchangeFilterFunction auditLog() { return
(instance, request, next) -> { if (HttpMethod.POST.equals(request.method())) { log.info("{} for {} on {}", request.method(), instance.getId(), request.url()); } return next.exchange(request); }; }
19 Customization - Notifier @Bean public Notifier loggerNotifier() { return
event -> { log.info("Event {}", event.toString()); return Mono.empty(); }; }
20 Webflux Support Out of the Box Cloudfoundry Support Html-Templates
for Mail-Notifications Version is also looked up in Metadata Sessions Endpoint Support Wallboard View Runs on Java 10 New Features in 2.0
21 Bugfixes… Bugfixes… Bugfixes… Spring Cloud Finchley Support Custom Views
(for Custom Actuator Endpoints) Multi-Instances-Actions (e.g. Setting Loglevels) . . . What to Expect in the Future
22 Questions? [spring-boot-admin] codecentric/spring-boot-admin GITTER codecentric/spring-boot-admin