Zabbix Monitoring Resin

Source: Internet
Author: User

I. Introduction to the Environment

Server information: zabbix-server:172.16.4.6zabbix-java-gateway:172.16.0.7resin:172.16.0.6
Software Environment: Zabbix version: Zabbix server v2.4.6 zabbix-java-gateway:zabbix-java-gateway-2.4.6-1.el6.x86_64.rpm Test Jar:cmdline-jmxclient-0.10.3.jar


Second, installation Zabbix

Zabbix installation can refer to Zabbix official website, here is not detailed description, refer to the following URL:

Https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages

Zabbix-java-gateway:

http://www.zabbix.com/download.php

Zabbix-java-gateway Official Website Installation Introduction:

Https://www.zabbix.com/documentation/2.4/ru/manual/concepts/java?s[]=java

Test jar: (Need to flip ... )

Http://crawler.archive.org/cmdline-jmxclient/cmdline-jmxclient-0.10.3.jar


Third, install the Zabbix-java-gateway gateway:

Installation

# RPM-IHV zabbix-java-gateway-2.4.6-1.el6.x86_64.rpm Preparing ... ######################################## # # [100%] 1:zabbix-java-gateway ########################################### [100%]

To modify a configuration file:

# Grep-ev "(^#|^$)"/etc/zabbix/zabbix_java_gateway.conf listen_ip= "172.16.0.7" \\zabbix-java-gateway Gateway Listener address Listen_ port=10052 \\zabbix-java-gateway Gateway Listening port pid_file= "/var/run/zabbix/zabbix_java.pid" \\zabbix-java-gateway pid file path St Art_pollers=5 \ \ start 5 threads timeout=10 \ \ timeout length

Start the Zabbix-java-gateway Gateway

#/etc/init.d/zabbix-java-gateway Start

Check if the Zabbix-java-gateway gateway started successfully

# NETSTAT-TPLN | grep 10052tcp 0 0 172.16.0.7:10052 0.0.0.0:* LISTEN 6976/java


Iv. configuring resin, enabling JMX

in the conf/directory under the resin home directory, modify the resin.conf configuration file to add information :

may refer to the official website introduction: HTTP://CAUCHO.COM/RESIN-4.0/ADMIN/ADVANCED-JMX.XTP

<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg> <jvm-arg>- Dcom.sun.management.jmxremote.port=12345</jvm-arg> <jvm-arg>-dcom.sun.management.jmxremote.ssl= False</jvm-arg> <jvm-arg>-Dcom.sun.management.jmxremote.authenticate=false</jvm-arg>

After adding resin to the resin, restart the startup resin

#/etc/init.d/resin stop#/etc/init.d/resin Start

Enable the Zabbix-java-gateway option on the Zabbix-server side:

# Grep-ev "(^#|^$)"/etc/zabbix/zabbix_server.conf | Grep-i javajavagateway=172.16.0.7 \\zabbix-java-gateway's address javagatewayport=10052 \ \ Zabbix-java-gateway port number startjavapollers=5 \ \ Boot 5 threads


V. On the Zabbix-java-gateway server, use Cmdline-jmxclient-0.10.3.jar to get the key of the resin server

Get key

# java -jar cmdline-jmxclient-0.10.3.jar  - 172.16.0.6:12345 |  Sortcom.alibaba.druid:id=1924372698,type=druiddatasourcecom.alibaba.druid:type= Druiddatasourcestatcom.alibaba.druid:type=druiddrivercom.alibaba.druid:type=druidstatservicecom.alibaba.druid: Type=mockdrivercom.sun.management:type=hotspotdiagnosticjava.lang:name=cms old gen,type= Memorypooljava.lang:name=cms perm gen,type=memorypooljava.lang:name=codecachemanager,type= Memorymanagerjava.lang:name=code cache,type=memorypooljava.lang:name=concurrentmarksweep,type= Garbagecollectorjava.lang:name=par eden space,type=memorypooljava.lang:name=parnew,type= Garbagecollectorjava.lang:name=par survivor space,type=memorypooljava.lang:type= Classloadingjava.lang:type=compilationjava.lang:type=memoryjava.lang:type=operatingsystemjava.lang:type= Runtimejava.lang:type=threadingjava.util.logging:type=loggingjmimplementation:type=mbeanserverdelegateresin: Host=www.magedu.com,name=deploy,type=eardeployresin:host=www.magedu.com,name=deploy,type=resourcedeployresin:host= www.magedu.com,name=/resin-doc,type=WebAppresin:Host=www.magedu.com,name=/solr,type=WebAppresin:Host= www.magedu.com,name=/,type=WebAppresin:Host=www.magedu.com,name=webapps,type=WebAppDeployresin:Host= www.magedu.com,WebApp=/,name=/data/web/sucai.zcool.com.cn/WEB-INF/rewrite.xml,type=RewriteImportresin:Host= www.magedu.com,WebApp=/resin-doc,name=jdbc/resin,type=ConnectionPoolresin:Host=www.magedu.com,WebApp=/ resin-doc,name=jdbc/resin,type=jdbcdriverresin:host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/ Amber-basic-field,type=webappresin:host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/amber-basic, Type=webappresin:host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/amber-create,type=webappresin: host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/amber-inherit,type=webappresin:host= www.magedu.com,WebApp=/resin-doc,name=/resin-doc/examples/Amber-many2many,type=webappresin:host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/amber-many2one , type=webappresin:host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/amber-one2many,type= webappresin:host=www.magedu.com,webapp=/resin-doc,name=/resin-doc/examples/amber-query,type=webappresin:host= Www.magedu.com,WebApp=/resin-doc,name=/resin-doc/examples/amber-session,type=WebApp ....... ....................... 。。 \ \ Omit some information here resin:name=127.0.0.1-6800,type=portresin:name=app-tier,type=clusterresin:name=hosts,type= Hostdeployresin:name=inaddr_any-8002,type=portresin:name=sucai.test.zcool.com.cn,type=hostresin:type= Blockmanagerresin:type=persistentstoreresin:type=proxycacheresin:type=resinresin:type=serverresin:type= ThreadPool

get value

# java -jar cmdline-jmxclient-0.10.3.jar  - 172.16.0.6:12345   "Resin: Type=threadpool " \\ Use this key to get multiple properties in this key, and then take advantage of the property to get the value Attributes: name: the name property  of the JMX ObjectName  (type=java.lang.string)  objectname: the jmx  ObjectName for the MBean  (type=javax.management.objectname)  threadactivecount:  The current number of active threads  (Type=int)  threadcount: the  current number of managed threads  (Type=int)  threadidlecount: the  current number of idle threads  (Type=int)  ThreadIdleMax: The  configured maximum number of idle threads  (Type=int)  ThreadIdleMin:  the configured minimum number of idle threads  (type=int)  ThreadMax:  the configured maximum number of threads  (Type=int)  type: the type property of  the JMX ObjectName  (type=java.lang.string)
# Java-jar cmdline-jmxclient-0.10.3.jar-172.16.0.6:12345 "resin:type=threadpool" Threadmax \ \ Use "Resin:type=ThreadPo Ol "Get the value of Threadmax 04/01/2016 18:29:58 +0800 org.archive.jmx.Client threadmax:15000


Six, as Zabbix use of key, value is obtained, we next make Zabbix template

Create a template named resin

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/6C/wKiom1b-TtOR1V5BAABDidzgf7c827.png "title=" 1.png " alt= "Wkiom1b-ttor1v5baabdidzgf7c827.png"/>

Add applications; The following are my own additions; you can add them to your needs:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/6C/wKiom1b-TzHijy_RAADEsygDJyM284.png "title=" 2.png " alt= "Wkiom1b-tzhijy_raadesygdjym284.png"/>

after adding applications, after adding the item, here to Memorypool_eden For example, add Item

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/68/wKioL1b-UFCjM8QVAAG0CPGD5kE779.png "title=" 3.png " alt= "Wkiol1b-ufcjm8qvaag0cpgd5ke779.png"/> Add a graphic after adding the item, the following is the drawing information I added myself:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/68/wKioL1b-UJ6AQSoBAAFgaUwLNCE650.png "title=" 4.png " alt= "Wkiol1b-uj6aqsobaafgauwlnce650.png"/>

By the time this template is made, you will now start associating templates in the host:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/6C/wKiom1b-UG2AJlIkAACfdzxy9p4834.png "title=" 5.png " alt= "Wkiom1b-ug2ajlikaacfdzxy9p4834.png"/>

When you are finished adding, you can see that the jmx of this host turns green:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/68/wKioL1b-UUzxdTWOAAApP280Lbs376.png "title=" 6.png " alt= "Wkiol1b-uuzxdtwoaaapp280lbs376.png"/>

Here we can meditate and look at the drawing information.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/6C/wKiom1b-UOvTIO88AAGJjMJk5d4755.png "title=" 7.png " alt= "Wkiom1b-uovtio88aagjjmjk5d4755.png"/>

To this, monitoring has been completed, if there is a bad place to do, please help correct, O (∩_∩) o Thank you

This article is from the "Trot Empty" blog, be sure to keep this source http://jingfu.blog.51cto.com/6184921/1759338

Zabbix Monitoring Resin

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.