1. Scenario description: Our environment uses microservices. Each program has a separate process and a separate port number. However, some results from the jps query may have duplicate names, so some scripts are not suitable for this scenario. 2. Requirements: Zabbix-server needs to be used to monitor the jvm process on each Agent (the monitoring items are specifically displayed in the template) 3. Prepare the environment: 1.jvm.py script (not original, copied directly from Github, the Github address is attached here, you can go directly to the target address to view the relevant instructions) 2. https://github.com/qiueer/zabbix/blob/master/Tomcat/usage.txt (zabbix/Tomcat/{jvm.py|Qiueer-Template JMX Generic.xml} template and script address) 3.jdk-8u201-linux-x64.tar.gz 4.Configure or disable iptables 4. Formal Installation 1. Install JDK on each Agent and configure environment variables (upload to the specified directory first). Each Agent performs the following operations. ~]# tar zxvf jdk-8u201-linux-x64.tar.gz ~]# vim /etc/profile // Add the following content #JAVA environment variable export JAVA_HOME=/usr/local/jdk1.8.0_201 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin export PATH=$PATH:${JAVA_PATH} ~]# source /etc/profile ~]# ln -s /usr/local/jdk1.8.0_201/bin/java /bin/java // If you don't make this link, you won't be able to get some information about jvm 2. Upload cmdline and jvm.py to the specified directory for testing (each Agent needs to do this) zabbix_agentd.d]# pwd /etc/zabbix/zabbix_agentd.d zabbix_agentd.d]# mkdir script script]#ll -rw-r--r-- 1 wenkai person 20124 Sep 10 18:55 cmdline-jmxclient-0.10.3.jar // Upload to the /etc/zabbix/zabbix_agentd.d/script directory -rw-r-xr-x 1 root root 13941 Sep 10 18:57 jvm.py script]# python jvm.py --list // If data in JSON format can be found, the script is available script]# python jvm.py -b 'java.lang:type=Memory' -k 'HeapMemoryUsage.committed' -p 30497 1020067840 3. Configure the web interface template, download the Qiueer-Template JMX Generic.xml template to the local computer and import it into Zabbix to form a new template. The template is equipped with automatic discovery rules, various monitoring items and triggers; 4. After the configuration is completed, wait for a while to find the data on the monitored host, as follows... Note: Some monitoring items in the template are not applicable to our services and can be disabled here. Summarize The above is the method of Zabbix monitoring multiple JVM processes introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: A brief discussion of 12 classic problems in Angular
>>: Detailed explanation of several ways to export data in Mysql
This article introduces the method of using CSS3 ...
In fact, it is very simple to achieve this effect,...
Table of contents utils: Use in vue: explain: Ima...
1 Introduction Redis is a high-performance NoSQL ...
Copy code The code is as follows: <!-- Prevent...
I recently came into contact with MySQL. Yesterda...
Long story short, today we will talk about using ...
Greek letters are a very commonly used series of ...
Table of contents 2. Field concatenation 2. Give ...
MySQL is a relatively easy-to-use relational data...
[Abstract] This article quickly builds a complete...
This question is a discussion among netizens in a...
<br />The header refers to the first row of ...
This article example shares the specific code of ...
Table of contents 1. Introduction to PXC 1.1 Intr...