How to Use Zorka, an open-source Java Monitoring Platform

Source: Internet
Author: User

How to Use Zorka, an open-source Java Monitoring Platform

In terms of Java Plug-in tools, we have been using Kieker. Today we have studied another Java monitoring platform Zorka. Here we take Windows + Tomcat as an example to record the most basic installation process:

Its homepage is: Workshop. Download zorka-1.0.11.zip and decompress it. Copy the decompressed folder to the Tomcat root directory and rename it "zorka" (to facilitate subsequent settings ).

On this page: http://zorka.io/install/index.html detailed introduction of Zorka installation and configuration methods, but I still find some unclear in the configuration process: first of all, according to the introduction of the official website, the decompressed folder should contain the following content:

By convention zorka files reside in<appserver-home>/zorkaDirectory which wil be refered as agent home directory. It contains the following objects:

  • zorka.jar-Agent jar (all dependencies encoded );
  • scripts/*.bsh-Extension scripts loaded at agent startup;
  • log/*-Log and trace files will be stored here;
  • templates/*-Templates for zabbix (and maybe other monitoring systems); this directory isn' t used by agent itself and can be safely removed after installation;
  • zorka.properties-Main configuration file;

But it's strange that I didn't see the scripts folder. Continue to look down: refer here:

1 scripts = jvm.bsh, zabbix.bsh, apache/tomcat.bsh

Obviously, some bsh scripts are referenced, but these bsh files are not seen at all. After thinking for a long time, I decided to look for it from GitHub. Here I found many bsh files in zorka-master \ zorka-core \ target \ classes \ com \ jitlogic \ zorka \ scripts, copy the entire folder to the "zorka" folder. The normal reference can be implemented.

Next, you should modify Tomcat startup options. For windows, you should modify catalina. bat in the bin directory and add it to the appropriate location:

1 set JAVA_OPTS=%JAVA_OPTS% -javaagent:%CATALINA_BASE%\zorka\zorka.jar -Dzorka.home.dir=%CATALINA_BASE%\zorka

Note that the content here is slightly different from that on the official website.

Follow the Tomcat installation method page and add the following to the file zorka. properties:

1 zorka.spy.compute.frames = yes

This line. After the modification, we try to start Tomcat and perform some operations. We can find that zorka logs are generated under Zorka \ log. However, there is no monitoring Trace. Note that:

Adjust other settings in zorka. properties if necessary (log files, listen port number etc .);

Therefore, you may need to set the location of the monitoring file. On this page: The http://zorka.io/install/tracer.html details Trace configuration and tuning methods. We chose the simplest way to generate monitoring records in the file system. The lines in the zorka. properties file are as follows:

# Uncomment this to save tracer data in local file. Deprecated.# tracer.file = yes

Add the following configurations:

12345 tracer.file = yestracer.file.path = trace.trctracer.file.fnum = 8tracer.file.size = 128Mtracer.net = no

Open Tracer: tracer = yes.

To easily generate monitoring data, we make the following changes:

12 tracer.min.trace.time = 0tracer.min.method.time = 0

When these two values are set to 0, all monitoring records can be output. At this time, we restart Tomcat and perform some operations, you can see a trace in the bin directory of Tomcat. trc, but what I see after opening it with the text editing software is garbled and I haven't had time to study the encoding method. To facilitate reproduction, I will upload the modified zorka. properties file.

Download zorka. properties

------------------------------------------ Split line ------------------------------------------

Free in http://linux.bkjia.com/

The username and password are both www.bkjia.com

The download directory is available at/July 15,/July 9/July 9/basic usage of the open-source Java monitoring platform Zorka/

For the download method, see

------------------------------------------ Split line ------------------------------------------

The above are some basic usage methods of this tool. In simple terms, this tool supports beanshell script language configuration, which is quite powerful.

Zorka details: click here
Zorka: click here

This article permanently updates the link address:

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.