閱讀999 返回首頁    go 阿裏雲 go 技術社區[雲棲]


tomcat7 - cacti 備忘

模板下載位置

https://codeload.github.com/hobbiesness/Cacti-Tomcat/zip/master

 

 增加安全管理設定

/usr/local/tomcat/conf/tomcat-users.xml

 

<tomcat-users>

   <role rolename="manager-gui" />

   <role rolename="manager-script" />

<!--

   <role rolename="manager-jmx" />

   <role rolename="manager-status" />

   <user username="username" password="yourpassword"

 roles="manager-gui,manager-script,manager-jmx,manager-status"  />

-->

   <user  username="username" password="yourpassword" roles="manager-gui,manager-script">

</tomcat-users>

 

重啟 tomcatd 測試管理頁是否生效

 

https://X.X.X.X:8080/manager/status?XML=true

 

參考網頁數據

注意需要監控的 connector命名

 

測試

/usr/local/bin/php  fetchTomcatStats.php  username password tomcat_a 8080 \"http-bio-8080\"

free:894417384 total:1020002304  max:1020002304 maxThreads:200 currentThreadCount:0 currentThreadsBusy:0  maxThreads:200 currentThreadCount:10 currentThreadsBusy:1 maxTime:0  processingTime:0 requestCount:0 errorCount:0 bytesReceived:0 bytesSent:0  maxTime:1413 processingTime:4715 requestCount:279 errorCount:5  bytesReceived:0 bytesSent:3178055

 

:  bash測試時需定義\"http-bio-8080\",cacti定義connector "http-bio-8080”

 

manager-gui             允許訪問html接口(URL路徑為/manager/html/*)

manager-script        允許訪問純文本接口(URL路徑為/manager/text/*)

manager-jmx            允許訪問JMX代理接口(URL路徑為/manager/jmxproxy/*)

manager-status       允許訪問Tomcat隻讀狀態頁麵(URL路徑為/manager/status/*)

 

manager-guimanager-scriptmanager-jmx均具備manager-status 權限

manager-guimanager-scriptmanager-jmx角色權限無需再額外添加manager-status權限

可直接訪問路徑/manager/status/*

 

  cacti_host_template_tomcat_server.xml導入 cacti後修改

配置過程中,注意下麵連接方法的定義

 

 

假如修改了管理密碼,需要在菜單 management - Data Sources - RRAs中對應項目修改

 

最後更新:2017-04-03 16:48:59

  上一篇:go poj 1144 Network 關節點
  下一篇:go poj 1966 Cable TV Network 點聯通度