使用prometheus監控springboot服務

    公司項目開發用的springboot,相關的開發開啓裏springboot的actuator對裏面的服務進行監控,數據格式是JSON的,以前開發部門寫了對應的監控服務,可是有以下問題:
git

1)不能有歷史監控數據的展現github

2)監控服務進程常常獲取不到數據spring

    針對如上問題,我採用prometheus對原有監控服務進行改造,思路以下:springboot

1)自己prometheus有關於springboot的監控,不過要引入對應jar會對開發那邊有改動。因此原有的springboot監控信息暴露方式JSON不變,經過本身編寫的對應exporter把JSON格式轉換成prometheus監控metrics數據格式。
ide

具體的github地址以下:進程

https://github.com/liyinda/springboot-actuator-exporter

支持中/英文README
開發

感興趣或者有一樣需求的朋友能夠下載運行使用,歡迎pull request,若是以爲還不錯,歡迎star it ^-^get


2)使用prometheus和grafana對監控數據展現,能夠有直觀的歷史曲線圖it

相關文章
相關標籤/搜索