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
Java User Group - Spring Boot Admin
Search
Johannes Edmeier
September 05, 2018
Programming
0
230
Java User Group - Spring Boot Admin
Johannes Edmeier
September 05, 2018
Tweet
Share
More Decks by Johannes Edmeier
See All by Johannes Edmeier
Spring IO 2018 - Monitoring Spring Boot Applications with Spring Boot Admin
joshiste
2
3k
Other Decks in Programming
See All in Programming
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
200
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
CNCF Project の作者が考えている OSS の運営
utam0k
5
690
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.3k
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
180
Ruby on cygwin 2025-02
fd0
0
140
Unity Android XR入門
sakutama_11
0
140
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
640
【PHP】破壊的バージョンアップと戦った話〜決断と説得
satoshi256kbyte
0
120
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
360
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
35
1.6k
For a Future-Friendly Web
brad_frost
176
9.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
31
2.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Writing Fast Ruby
sferik
628
61k
The World Runs on Bad Software
bkeepers
PRO
67
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Building Flexible Design Systems
yeseniaperezcruz
328
38k
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.3</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
Behind the Scenes 10
11 SBA Client SBA Server client registers periodically via http
post
12 SBA Client SBA Server server polls health endpoint via
http … monitoring non-Boot applications is possible (just health checking)
13 Notifications HipChat eMail … or implement your own …
simply configured via properties
14 SBA Client server forwards requests to clients (using zuul)
SBA UI SBA Server … clients must expose actuator endpoints using http
15 … can be implemented using Spring Security e.g. Basic
Auth, JWT, session based, … … custom headers can be injected implementing a HttpHeadersProvider Security
16 Customization – HttpHeadersProvider @Bean public HttpHeadersProvider injectHeaders() { return
instance -> { HttpHeaders headers = new HttpHeaders() headers.set("X-CUSTOM", "1234567"); return headers; }; }
17 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); }; }
18 Customization - Notifier @Bean public Notifier loggerNotifier() { return
event -> { log.info("Event {}", event.toString()); return Mono.empty(); }; }
19 Webflux Support Sessions Endpoint Support Mapping Endpoint Support Scheduled
Tasks Endpoint Support Out of the Box Cloudfoundry Support Html-Templates for Mail-Notifications Version is also looked up in Metadata Wallboard View Runs on Java 10 New Features in 2.0
20 Bugfixes… Bugfixes… Bugfixes… Support for Cache Endpoint (2.1.x) Multi-Instances-Actions
(e.g. Setting Loglevels) . . . What to Expect in the Future
21 Questions? [spring-boot-admin] codecentric/spring-boot-admin GITTER codecentric/spring-boot-admin