Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

TOMCAT monitoring index

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Now that the operation and maintenance is done and the software environment is set up, the next thing to do is to monitor. I think this is good for which indicators, software and everything are monitored by tomcat.

Monitoring system needs to be able to effectively support white-box monitoring and black-box monitoring. Through the white box monitoring, we can understand its internal actual operation status, and through the observation of the monitoring indicators, we can predict the possible problems, so as to optimize the potential uncertain factors. Black-box monitoring, such as HTTP probe, TCP probe and so on, can quickly notify the relevant personnel to deal with when the system or service fails.

The four golden metrics monitored can help us better measure end-user experience, service disruption, business impact, and other issues at the service level.

Focus on the following four types of metrics: error, delay, traffic, and saturation.

The common 500quot 403 and 404, access errors

Delay, the time to complete a request

Through the understanding of black box and white box monitoring, combined with the four gold indicators of monitoring, aiming at the important monitoring indicators of Tomcat, we can consider the following aspects:

Connection: https://zhuanlan.zhihu.com/p/54226097

The rest is the ability to look at the script, use zabbix to produce a good-looking picture, elk can also search the log to achieve kibana.

Connection: https://juejin.im/post/5d691f2df265da03c128af42

That's a good connection, https://zhuanlan.zhihu.com/p/52231137.

By setting some simple permissions, you can immediately start using Tomcat Manager to view Tomcat and JVM data. Once remote connectivity is enabled for JMX, you can use tools such as JConsole to monitor Tomcat data through a simple graphical interface. Tomcat also provides basic diagnostic information about requests and server activity in its access and server logs.

In the early stage, I learned about the basic framework and built the tomcat9.0 version, because the interview mentioned tomcat monitoring, and by the way, I configured the three buttons of the tomcat welcome interface, because I had a busy day at work temporarily. I would like to record that a lot of materials on the Internet are just so-so.

Recommend a connection to the official website, which is better written.

Https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html#Deploy_a_Directory_or_WAR_by_URL

Environment

CentOS Linux release 7.3.1611 (Core)

Tomcat9.0.27 download

Jdk-8u191-linux-x64.tar.gz download password v1hu

First of all, install jdk. If you have to uninstall the jdk prompts on the Internet, the previous installation of my jdk is quite messy. So rpm-qa | grep jdk then found the installed yum remove XXXXXtar-zxvf jdk-8u191-linux-x64.tar.gzmv jdk-8u191-linux-x64 jdk13.0.1 to add. Bash_profile JAVA_HOMEJAVA_HOME=/root/jdk13.0.1/export PATH=$PATH:$JAVA_HOME/bin [root@localhost ~] # tar-zxvf apache-tomcat-9.0.27.tar.gz [root@localhost ~] # cp apache-tomcat-9.0.27 tomcat9.0 .27 so that the tomcat decompression is complete. Without installation, just use [root@localhost tomcat9.0.27] # sh bin/startup.sh Using CATALINA_BASE: / root/tomcat9.0.27Using CATALINA_HOME: / root/tomcat9.0.27Using CATALINA_TMPDIR: / root/tomcat9.0.27/tempUsing JRE_HOME: / usrUsing CLASSPATH: / root/tomcat9.0.27/bin/bootstrap.jar:/root/tomcat9.0.27/bin/tomcat-juli.jarTomcat started. [root@localhost tomcat9.0.27] #

So the installation is complete, and there are three buttons in the marked place.

Server status

Manager app

Host manager

Clicking on any one will prompt you.

Three places are marked:

The first line prompt whether the context.xml is configured or not is disgusting. I don't know where the context.xml is if I don't pay attention.

I looked for it.

[root@localhost tomcat9.0.27] # find. /-name context.xml

. / conf/context.xml

. / webapps/host-manager/META-INF/context.xml

. / webapps/manager/META-INF/context.xml always thought it was under CATALINA_BASE/conf, but in fact it wasn't. It was suggested in English that it was under manager, that is, under CATALINA_BASE/webapps/manager/META-INF/context.xml.

The second is to configure tomcat-users.xml

The third is how to configure tomcat-users.xml

First configure context.xml under the manger directory

I have added a comment on this line, but there is no original text, which means who can visit

The second is conf/tomcat-users.xml. This file is the CATALINA_BASE directory.

This is added to the tomcat-users tag.

To make it clear that this host manger tag is not the same as the above two, host manger uses / webapps/host-manager/META-INF/context.xml to understand that one of these three is a summary, and the other is for a certain app, just like a faucet, it opens the largest mouth while manger is a three-point tube, and host-manger is a five-point tube, so the permissions can be configured differently.

In addition, a case is configured with the official sample. This is conf/server.xml.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report