Cacti monitors multiple tomcat on a web

Source: Internet
Author: User

Cacti monitors multiple tomcat on a web

Part I: Monitoring a single Tomcat

1. First download the monitor Tomcat template

Tomcatstats-0.1.zip

After downloading, modify the tomcatstats.pl,

A. Note the use Data around the third row ::D umper;

B. my $xml = ' GET $url ' on line 19th, and change to my $xml = ' wget-qo-$url ';

C. Add this line print "" around line 24th;

D. Note the print dumper ($status) around line 23rd;

E. Place all of the following lines in the

such as:print "Connector_max_time: $status->{connector}->{$connector}->{requestinfo}->{maxtime}";

Instead:print "Connector_max_time: $status->{connector}->{requestinfo}->{maxtime}";

2. Import templates

(Cacti_host_template_tomcat_server.xml)

Enter cacti---Console (console)---> Import Templates (import Template)

3, put tomcatstats.pl upload to the Cacti/scritps directory.

4. Then modify the configuration file of the monitored Tomcat

Vim/data/tomcat/tomcat_monitor/conf/tomcat-users.xml, <role rolename= "tomcat"/> <role rolename= " Manager-gui "/> <user username=" Tomcat "password=" Tomcat "roles=" Tomcat,manager-gui "/>

Add: Passwords here to set the password for the Tomcat admin page

Whether the Admin user who enters http://10.90.5.193:8250/manager/status to view the page is configured OK

5. Enter CACTI---> Console (console)--Data input Methods---> Tomcat Status

Modify input String (input stream) Zhongyuan

perl/scripts/tomcatstats.pl:8444 Admin Passwords http-8080

Modified to:

perl/scripts/tomcatstats.pl:8250 Tomcat Tomcat http-8250

6, Installation Xml::simple

Installation method: (perl-mcpan-e "Install Xml::simple")

It is possible that the installation failed (try executing perl-mcpan-e "Install Xml::simple again"). If you see such an error message:

Error1:

Shell code 650) this.width=650; "src=" Http://cwalet.iteye.com/images/icon_star.png "alt=" Favorites code/>

  1. Tests succeeded but one dependency not OK (Xml::sax::expat)

  2. grantm/xml-simple-2.18. tar.gz

  3. [Dependencies]--NA

  4. Running make Install

  5. Make test had returned bad status, won ' t install without force

To the effect that there is no XML::P arser~ To install the parser?

Reference: http://www.techiecorner.com/1839/cpan-error-make-test-had-returned-bad-status-wont-install-without-force/

Then enter the perl-mcpan-e Shell, the so-called cpan shell, and then execute the Force install Xml::simple

After the installation is complete CPAN then go back to the first step to install Xml::simple

Error2:

If you see this warning:could not find Parserdetails.ini in/usr/local/share/perl5/xml/sax

See here: http://hi.baidu.com/rosachian/blog/item/b4aaca2c6758ce39359bf712.html

and perform this:perl-mxml::sax-e "Xml::sax->add_parser (' Xml::sax::P ureperl ')->save_parsers ()"

7. Restart Tomcat_monitor

shell>/etc/init.d/tomcat_monitor Stop

Shell>/etc/init.d/tomcat_monitor Start

Settings for 8.Tomcat Manager

After the setup is complete, you can test it with the method mentioned in the install.

Example:./tomcatstats.pl 10.90.5.193:8250 Tomcat Tomcat http-8250, you will get:

jvm_memory_free:64522688 jvm_memory_max:1023934464 jvm_memory_total:81854464 connector_max_time:66 connector_error _count:19 connector_bytes_sent:2957318 connector_processing_time:804 connector_request_count:677 Connector_bytes_ received:0 connector_current_thread_count:25 connector_min_spare_threads:25 connector_max_threads:150 connector_ max_spare_threads:75 Connector_current_threads_busy:2 [Root]

Lists the results of the check.

9, if the front of the diagram is correct, the figure does not come out , you can try to put Templates (template)-->graph Templates (graphics template)--(not out of the diagram template)-Unit Grid Value (--unit/-- Y-grid) is emptied.

During the test, the tomcat-connection rate and TOMCAT-HEAP statistics are not available, either empty or set to 0 o'clock for the image to appear.



Cacti monitors multiple tomcat on a web

Related Article

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.