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 Applications with Spring Boot Admin
Search
Johannes Edmeier
May 24, 2018
Programming
2
2.9k
Spring IO 2018 - Monitoring Spring Boot Applications with Spring Boot Admin
Johannes Edmeier
May 24, 2018
Tweet
Share
More Decks by Johannes Edmeier
See All by Johannes Edmeier
Java User Group - Spring Boot Admin
joshiste
0
200
Other Decks in Programming
See All in Programming
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
22
15k
"config" ってなんだ? / What is "config"?
okashoi
0
220
Java 22 Overview
kishida
1
170
オブジェクト指向のリ・オリエンテーション~歴史を振り返り、AI時代に向きなおる~
hanyudaeiiti
10
5.7k
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
240
脱・初心者!脱・マネコン!AWS CDKを使ってみませんか!?
har1101
0
300
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
360
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
220
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
18
4.9k
スクラムチームと認知負荷 - ニフティのスクラムトーク Vol2. / NIFTY Tech Talk #18
niftycorp
PRO
1
120
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.3k
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
100
Featured
See All Featured
How GitHub (no longer) Works
holman
304
140k
Bash Introduction
62gerente
604
210k
What's in a price? How to price your products and services
michaelherold
237
11k
Optimizing for Happiness
mojombo
370
69k
A Modern Web Designer's Workflow
chriscoyier
688
190k
Done Done
chrislema
178
15k
Agile that works and the tools we love
rasmusluckow
324
20k
Atom: Resistance is Futile
akmur
258
25k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
273
13k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Ruby is Unlike a Banana
tanoku
96
10k
Debugging Ruby Performance
tmm1
70
11k
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