oshi-spring-boot-starter 爲服務監控而生

oshi-spring-boot-starter

oshi-spring-boot-starter 是一個基於開源項目oshi編寫的一個spring-boot-starter,目的是爲了方便基於spring-boot的項目集成oshi組件,用於查看服務器的運行情況如:CPU、硬盤、內存、JVM等的使用情況。

UI動態展示系統參數, 基於spring boot,bootstrap4
run as a stand alone app or a dependency of any spring boot based application.
界面截圖

docker demo演示

run within docker by execute script below.
explanation: run service container as monitor and publish port on host server port 8081 or any other available ports you replace with.

sudo docker run -d --name monitor -p 8081:8080 imjcker/sys-spring-boot-starter:latest

克隆

git clone https://github.com/imjcker/oshi-spring-boot-starter

依賴引入

<dependency>
    <groupId>com.imjcker</groupId>
    <artifactId>oshi-spring-boot-starter</artifactId>
    <version>1.0.1</version>
</dependency>

配置

# default configuration
imjcker:
  oshi:
    sys-view-servlet:
      enbled: true
      url-pattern: /oshi/*

微信公衆號

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章