前言:今天把公司的一台tomcat服务器进行了迁移,为了查看在使用过程中的详细信息,在网上搜索了很多关于web服务器的监控软件,最后拟定使用probe这个开源并且功能也很完善的一款工具接下来介绍一下使用方法与安装技巧

一、简介

psi-probe是lambdaprobe的一个分支版本,用于对Tomcat进行监控,比tomcat的manager强大很多。

psi就是一个形如叉子的符号Ψ,希腊字母的第23个字母,用来代表fork。

为啥需要分支呢,因为lambdaprobe已经多年没有更新(大致在2006年就停止发布新版本了)。

二、下载地址

http://code.google.com/p/psi-probe/downloads/list

三、安装

1.解压,将probe.war放进webapps目录。

2.修改CATALINA_HOME/conf/tomcat-users.xml

(权限配置参考如下,由于首先保证可运行,权限没有特别细分,仅供参考)

<tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<!--
  NOTE:  The sample user and role entries below are wrapped in a comment
  and thus are ignored when reading this file. Do not forget to remove
  <!.. ..> that surrounds them.
-->
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <role rolename="poweruser"/>
  <role rolename="probeuser"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>

<user username="sss" password="sss" roles="manager-gui"/>
  <user username="fbysss" password="sss" roles="manager-script,manager-jmx,manager-status,poweruser,probeuser"/>
</tomcat-users>

四、注意事项

1.不要忘记文件中的<!---->,默认是注释的,需要去掉

2.tomcat6.0.30以上,角色manager一分为四,manager仍保留但不建议使用,因为那样容易遭到CSRF攻击。详见下面的描述:

[xhtml] view plaincopy
  1. Note that for Tomcat 6.0.30 onwards, the roles required to use the manager application were changed from the single manager role to add the following four roles. (The manager role is still available but should not be used as it avoids the CSRF protection). You will need to assign the role(s) required for the functionality you wish to access.
  2. manager-gui - allows access to the HTML GUI and the status pages
  3. manager-script - allows access to the text interface and the status pages
  4. manager-jmx - allows access to the JMX proxy and the status pages
  5. manager-status - allows access to the status pages only
  6. The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:
  7. users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
  8. if the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.

如果配置不对,就会出现403的错误,连tomcat的manager都进不了,更不用说probe了。

3.lambdaprobe是不支持tomcat6.0.30的。所以最好使用psi-probe。

4.在配置tomcat-users.xml时,还需要加入poweruser等角色,才可以正常使用,不然也是403Forbidden。

5.如果要查看System Information,需要在catalina.sh中加入如下语句:

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"

windows版本:catalina.bat中加入SET JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote

五、权限控制

probe有 probeuser、poweruser、poweruserplus、manager(针对不同tomcat版本)等角色,对应可操作的功能如下表:

特别注意一点:表格里面的X表示拥有权限,也就是说,manager的权限是最大的,什么都能操作(不推荐配置)。

六、测试

启动tomcat,访问http://127.0.0.1:8080/probe,输入前面配置的用户密码即可

点击相应的链接就可以看到各种实时监控信息了

tomcat服务器监控工具之probe相关推荐

  1. 推荐一款功能强大的Tomcat 管理监控工具,可替代Tomcat Manager

    我们在本地启动Tomcat服务器后,用localhost:<默认端口>访问: 再点Manager App,即可进入Tomcat自带的Manager这个应用,此处可以单独部署/卸载每一个应用 ...

  2. Tomcat 服务器的端口号的修改

    在系统中找到Tomcat安装目录下的conf文件夹下的servlet.xml文件. (1)在servlet.xml文件中找到以下代码: <connector port="8080&qu ...

  3. 服务器可视化_系统管理员不可错过的6款服务器监控工具

    服务器监控工具对系统管理员的重要性不言而喻.今天给大家介绍6个服务器监控工具. 1.Conky Conky能在多个的平台上运行,像Windows,Linux,Mac OS,大多数BSD都可以.它有简单 ...

  4. Tomcat服务器端口的配置

    一.Tomcat服务器端口的配置 Tomcat的所有配置都放在conf文件夹之中,里面的server.xml文件是配置的核心文件. 如果想修改Tomcat服务器的启动端口,则可以在server.xml ...

  5. 利用memcached做缓存服务器,为后端tomcat服务器做会话保持,利用httpd的jk模块模块做负载均衡...

    前端使用httpd作为反代负载均衡至后端tomcat主机:tomcat可用memcached当做会话服务器保存会话: 实验环境:物理机win7,虚拟机centos7 node1:172.18.11.1 ...

  6. Eclipse利用Maven的插件部署web项目到远程tomcat服务器

    使用maven的自动部署功能可以很方便的将maven工程自动打包并且部署到远程tomcat服务器,省去一些繁琐的操作,节省大量时间. 我使用的tomcat版本是8.5,tomcat7和tomcat8都 ...

  7. linux 下,解决tomcat服务器接收中文乱码的问题

    linux 下,解决tomcat服务器接收中文乱码的问题 参考文章: (1)linux 下,解决tomcat服务器接收中文乱码的问题 (2)https://www.cnblogs.com/taz372 ...

  8. Apache服务器和tomcat服务器有什么区别?

    Apache与Tomcat都是Apache开源组织开发的用于处理HTTP服务的项目,两者都是免费的,都可以做为独立的 Web服务器运行.Apache是Web服务器而Tomcat是Java应用服务器. ...

  9. 二、JavaWeb总结:Tomcat服务器的学习和使用

    2019独角兽企业重金招聘Python工程师标准>>> 一.Tomcat服务器端口的配置 Tomcat的所有配置都放在conf文件夹之中,里面的server.xml文件是配置的核心文 ...

最新文章

  1. linux进程间通信:POSIX信号量
  2. 大学计算机基础 学年教学计划,大学计算机基础教学计划.pdf
  3. Open-falcon运维监控系统——微信接口二次开发
  4. 中美程序员的不完全对比,看看跟你了解的一样吗?
  5. 监听列表ListVIew的滑动状态
  6. 微信小程序开发——超链接或按钮点击跳转到其他页面失效
  7. Python 文件读写
  8. Android Jetpack组件之数据库Room详解(二)
  9. Minidao_1.6.2版本发布,超轻量Java持久化框架
  10. 通过导入txt数据画出python turtle图形_【Python】txt文件读取绘画
  11. python rq asyncio_python异步IO-asyncio
  12. 花5000元买2天训练营,年轻人正在「高价买觉睡」
  13. 观察者模式(浅谈监听器工作原理)
  14. 看雪CTF.TSRC 2018 团队赛 第八题 『二向箔』 解题思路
  15. 帆软报表多行多条数据写入表_超多种类的报表模板,填上数据就能用,全拿走!...
  16. 星星之火-49:5G 移动边缘计算MEC快览
  17. 读研攻略(11)—十分钟学会简历撰写,两千字无废话
  18. analogWrite怎么做PWM输出?改PWM频率(定时器相关)
  19. python tkinter界面随分辨率自动调整尺寸,Tkinter画布自动调整大小
  20. 前端将后端返回的文件流转为excel并下载

热门文章

  1. Mysql数据库,巧妙使用IFNULL()函数,累计求和.
  2. 熙可集团执行总裁:中国食品安全核心是体制问题
  3. 使用vue创建一个遮罩组件_用于输入遮罩的另一个Vue组件
  4. WIN7键盘失灵解决方案
  5. 计算机视觉方向简介 | 三维重建技术概述
  6. 100天精通Python丨基础知识篇 —— 05、7大基础数据类型详解(变量、列表、集合、字典、元组)
  7. 层次聚类算法的原理及实现Hierarchical Clustering
  8. Android 实现App修改应用图标
  9. 从“删库跑路”聊聊开启BinLog防止误删表数据、结构及数据库
  10. abp mysql 出错_ABP记录被删除调用Repository.Get报错