Jmeter (14) jmeter monitoring Tomcat Performance

Source: Internet
Author: User

By using the Tomcat monitor function of jmeter, you can send a GET request to the Tomcat status page to obtain resource usage information and convert it to an intuitive image method, you can monitor the resource usage of the server. However, to use the Tomcat monitor function, you must install Tomcat on the server to be monitored.

 

1. configure $ catalina_home/CONF/tomcat-users.xml. The configuration is as follows:

<? XML version = '1. 0' encoding = 'utf-8'?>

<Tomcat-users>

<Role rolename = "manager"/>

<Role rolename = "admin"/>

<User Username = "admin" Password = "admin" roles = "Admin, Manager"/>

</Tomcat-users>

Note: two roles must be configured here. The admin role is responsible for Tomcat administration and the manager role is responsible for Tomcat Manager Management.

 

2. Create a test plan in jmeter

1. right-click the "thread group" and choose "add"> "Configuration component"> "HTTP Authorization manager". Here, jmeter can obtain data through the Basic Authentication of Tomcat, add the corresponding values to "User Name" and "password", as shown in

2. right-click "add" -- "sampler" -- "http request" on the "thread group". In the HTTP request interface that appears, add "Server IP", "port number", and other information, fill in "Manager/status" in "path" and add a parameter named "XML" to "SEND Parameters together with requests". The value is "true, select the "use as monitor" option at the bottom, as shown in:

 

3. finally, right-click "add"> "monitor result" on "http request" and then run the thread group (the number of cycles of the thread group can be set to "forever "), you can monitor Tomcat and save the monitoring data as a file for further analysis, as shown in:

 

Iii. Problems Encountered

1. The tomcatmanager status code: 401

2. tomcatmanager status code: 403 Access Denied

Solution: The tomcat-user.xml configures the user's maximum permissions, the configuration also reports an error because your Tomcat service has not restarted

3. The result graph of the jmeter monitor is empty. I tried the solution on the Internet and still couldn't do it. I don't know what's going on. I hope someone can give me some advice and record it here first.

Jmeter (14) jmeter monitoring Tomcat Performance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.