2013年4月2日星期二

Tomcat Monitor

Jolokia Install

jolokia监控
# Deploy jolokia
cd /usr/local/tomcat/webapps/
mkdir jolokia
cd jolokia
wget http://www.myciscolab.net/sources/jolokia.tar.gz -O jolokia.tar.gz
tar xzvf jolokia.tar.gz
rm -rf jolokia.tar.gz
# service tomcat restart
# Threads Connector Memory 监控参数配置

Cacti Configure For Jolokia to Monitor Tomcat

JVM – Threads
URL for jolokia agent war : http://192.168.1.1:8080/jolokia
Path for Configure file : /usr/local/cacti/scripts/config/threads.cfg
测试语句: /usr/bin/cacti_jmx4perl -u http://www.myciscolab.net:8080/jolokia --config /usr/local/cacti/scripts/config/threads.cfg --check threads

TomcatStats – Connector
URL for jolokia agent war : http://192.168.1.1:8080/jolokia
Path for Configure file : /usr/local/cacti/scripts/config/tomcat.cfg
Protocol for connector : http-8080
测试语句: /usr/bin/cacti_jmx4perl -u http://www.myciscolab.net:8080/jolokia --config /usr/local/cacti/scripts/config/tomcat.cfg --check connector http-8080

TomcatStats – Memory
URL for jolokia agent war : http://192.168.1.1:8080/jolokia
Path for Configure file : /usr/local/cacti/scripts/config/memory.cfg
测试语句: /usr/bin/cacti_jmx4perl -u http://www.myciscolab.net:8080/jolokia --config /usr/local/cacti/scripts/config/memory.cfg --check lx_memory



注意:
1. jolokia在某个tomcat下只能有一个拷贝
2. Threads 和 Memory监控 只针对一个tomcat整理进行监控就Ok了
3. Connector 需要针对某个Service进行监控

/usr/bin/cacti_jmx4perl -u http://192.168.200.36:8888/jolokia --config /usr/local/cacti/scripts/config/threads.cfg --check threads
/usr/bin/cacti_jmx4perl -u http://192.168.200.36:8888/jolokia --config /usr/local/cacti/scripts/config/tomcat.cfg --check connector http-8888
/usr/bin/cacti_jmx4perl -u http://192.168.200.36:8888/jolokia --config /usr/local/cacti/scripts/config/memory.cfg --check lx_memory

没有评论:

发表评论