telegraf監控tomcat並將數據發送到prometheus再在grafana上展示可參考該鏈接
- tomcat配置請參數該連接內容配置tomcat 8.5訪問manager App界面
- 在telegraf.conf中添加如下配置
# Gather metrics from the Tomcat server status page.
[[inputs.tomcat]]
## URL of the Tomcat server status
url = "http://tomcatIP:tomcatPort/manager/status/all?XML=true"
## HTTP Basic Auth Credentials
username = "tomcat" #tomcat用戶
password = "tomcat" #tomcat密碼
## Request timeout
timeout = "5s"
- 重啓tomcat