tomcat7 - cacti 备忘

  1. 云栖社区>
  2. 博客>
  3. 正文

tomcat7 - cacti 备忘

terry.zeng 2013-08-19 12:11:00 浏览694
展开阅读全文

模板下载位置

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 测试管理页是否生效

 

http://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中对应项目修改

 

网友评论

登录后评论
0/500
评论
terry.zeng
+ 关注