JMX Automatic Monitoring Java application solution well-known file is not secure
Preface
Recently in doing a monitoring agent component development work, the main is to collect a variety of system metrics information, and then reported to the
System. Before Zabbix 1.8, you can only use Zapcat to monitor jmx and need to modify the source code to support it, which is cumbersome. Another approach is to use jmx-cmd-client, which is to get jmx information from the command
simple, but very detailed and convenient, that is, JMX.
All users of Hadoop's http Monitoring Ports know that namenode 50070, jobtracker 50030, datanode 50075, and tasktracker 50060. However, when you access these ports, the monitoring page such as dfshealth. jsp or jobtracker. jsp
Select the major elements of the operations tool: one is to see what indicators I need to monitor, the second is to see what I monitor the third is to see how the operation and maintenance of monitoring tools can be monitored to
Build weblogic9 monitoring software using JMX
For my work, I need to monitor multiple WebLogic servers. When the server status is abnormal, I will send an email notification.You can use the JMX function of WebLogic as required.
I. Changes and new features of weblogic9 in JMXWeblogic9 differs greatly from the previous 8
current command-line window, or modify the operating system's environment variablesIn previous Java, to use JMX to manage a JVM application, you had to add com.sun.management.jmxremote to the system variable to tell the JVM to open specific ports and protocols for management. But JAVA6 has supported JMX by default, which means:In the past Java version, suppose you want to run the Notepad program, you have
-djava.class.path= "C:\Program Files (x86) \java\jdk1.7.0_10\bin\jboss-client.jar; C:\Program Files (x86) \java\jdk1.7.0_10\lib\jconsole.jar; C:\Program Files (x86) \java\jdk1.7.0_10\lib\tools.jar "Enter the remote Call service, for example: service:jmx:http-remoting-jmx://10.19.xx.xx:8080, to fill in the user name and password created before650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-c
;
AdapterName = new ObjectName (jmxservername + ": name=" + "Htmladapter");
Adapter.setport (8082);
Adapter.start ();
Mbs.registermbean (adapter, adaptername);
Thread.Sleep (1000 *);
}
The above code used to htmladaptorserver, need to download jjmx-1_2_1-ri.zip, put inside Jmxtools.jar add classpath inside, download address: http://java.sun.com/products /javamanagement/download.html.
Then you can access it in the browser
3. Client Con
java_opts and Catalina_home variable settings (especially the heap memory parameter settings) Online article said there is a direct setting java_opts but this setting will be thrown when the stop is abnormal While not affecting the use of(Parameter meaning is:-dcom.sun.management.jmxremote Enable JMX remote
-djava.rmi.server.hostname=xxx.xxx.xxx.xxxjava_options+= ("-djava.rmi.server.hostname=xxx.xxx.xxx.xxx")If necessary, you can see the corresponding property configuration in Etc/jetty-jmx.xml and Jetty-jmx-remote.xmlLike what:Jetty.jmxrmiportJetty.jmxrmihostView the processes that are started under[Email protected] logs]# jps-vml |grep WebApp13165.. /jetty-man/start.jar-server-xms2g-xmx2g-xx:permsize=64m-xx:maxpermsize=128m-djava.rmi.server.hostname= 1
Reference: [JMX monitoring] [Zabbix Java gateway] [JMX monitoring (Java Gateway) not working]
This explains the configuration process for monitoring the Java process through JMX and the issues that need to be noted.
T
-dcom.sun.management.jmxremote.port=1499 $HADOOP _client_opts " This will open a port on the machine executing the Hadoop jar, which is determined by the -dcom.sun.management.jmxremote.port=1499 parameter.2. Start a mapreduce program, bash-4.1$ Hadoop jar /home/yanliming/workspace/mosaictest/videomapreduce/ videomapreduce-1.0-snapshot.jar/tmp/yanliming/wildlife.wmv/tmp/ryj/result/output012On the cluster that started the MapReduce, you can see that
ZABBIX2.4 JMX monitoring false positive [70% OS Process CPU Load on xxx] SolutionZABBIX2.4 uses the Template JMX Generic Template, which often reports false alarms. [70% OS Process CPU Load on xxx ].In fact, the cpu usage is very low.The reason is that the template has a bug
Tags: form extras information stop port false pre SSL REMAuthor remote server operating system CentOS 7.0, Tomcat version 7.01. Linux Tomcat Configuration 1.1 catalina_opt ConfigurationYou can add the following configuration in the catalina.sh filecatalina_home=/usr/local/tomcat_fd02_mcjava_opts="$JAVA _opts-djava.rmi.server.hostname= xxx.xxx.xxx.xxx \-dcom.sun.management.jmxremote.ssl=false- Dcom.sun.management.jmxremote.authenticate=false"Configuring Jmxremotelifecyclelistener in 1.2 serverEnt
Recently installed Cassandra to the product server, a lot of things require a lot of strict, such as Perf used in the JMX, previously as long as the IP can access, but the product server is not, so there is a security risk, nodetool-h host can add and delete nodes. So the thing to talk about today is Cassandra JMX's au
.
Third, test whether JMX successfully configured
Start Tomcat, enter in Windows command window: Netstat-aon | Findstr "8999" If this port is already in use, it proves that the JMX configuration was successful
Four, turn on JMX monitoring
Run%java_home%\lib\jconsole.jar
En
Tags: jmx server system monitoring cpu virtual machineNext, we provide another implementation method:First look at a class diagram:JDK implements nine built-in mbeans that can monitor all the information of virtual machines: ManagementFactoryThe factory class can get the corresponding MBean instance through ObjectName, and naturally the desired data can be obtained.2 The code
service, you can modify the parameters in the Service.bat so that the default parameters are set after the service is successfully installed without having to modify the Tomcat7w.exe again.Modify the location at the end of the Service.bat file, such as:REM Set extra parameters "%executable%"//us//%service_name%--jvmoptions "-dcatalina.base=%catalina_base%;-d catalina.home=%catalina_home%;-djava.endorsed.dirs=%catalina_home%\endorsed "--StartMode JVM-
server address)
Go to the JDK installation directory, under the/jre/lib/management directory, to view the files. and modify the Jmxremote.access file, the last two lines of the file display "Monitorrole and controlrole" comment cancellation, where monitorrole is only the role of read-only permissions, Controlrole have higher permissions: Read-write, and so on. After editing is complete, save.
By defaul
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.