Open source Java Monitoring Platform Zorka Basic use method

Source: Internet
Author: User

In the Java Pile tool, we have been using Kieker, a simple study of another Java monitoring platform Zorka, here Windows+tomcat as an example to record the most basic installation process:

Its homepage is: Http://zorka.io/,GitHub on the project homepage is: Https://github.com/jitlogic/zorka, on its homepage has its agent side download page: http://zorka.io/downloads.html. Download the Zorka-1.0.11.zip and unzip it. Copy the extracted folder to the Tomcat root directory and rename it "Zorka" (for further settings).

on this page:http://zorka.io/install/index.html  details the installation and configuration method of Zorka, But I still found in the configuration process some unclear: first, according to the official website, the extracted folder should contain the content:

by Convention Zorka files reside in <appserver-home>/zorka  directory which wil be refered as Agent home directory. It contains the following objects:

  • zorka.jar-Agent Jar (all dependencies included);
  • scripts/*.bsh-Extension scripts loaded at agent startup;
  • log/*-Log and trace files would be stored here;
  • templates/*-Templates for Zabbix (and maybe other monitoring systems); This directory is not used by agent itself and can is safely removed after installation;
  • zorka.properties-Main configuration file;

But it was strange that I didn't see scripts this folder. Continue to look down: according to http://zorka.io/install/tomcat.html here, you need to make a series of changes to zorka.properties this file, you should first add such a line:

Scripts = Jvm.bsh, ZABBIX.BSH, APACHE/TOMCAT.BSH

Obviously, this is a reference to some BSH scripts, but you don't see these BSH files at all. Thought for a while, decided to look for on GitHub, sure enough here: Zorka-master\zorka-core\target\classes\com\jitlogic\zorka\scripts found a lot of BSH files, Copy this folder to the "Zorka" folder as a whole. You can achieve a normal reference.

Second, the Tomcat startup option should be modified, and for Windows, you should modify the Catalina.bat in the bin directory to include it in its appropriate location:

Set java_opts=%java_opts%-javaagent:%catalina_base%\zorka\zorka.jar-dzorka.home.dir=%catalina_base%\zorka

Note that this is slightly different from the official website.

Follow the page of the Tomcat installation method that was added to the zorka.properties file:

Zorka.spy.compute.frames = yes

This line. After the modification, we try to start Tomcat and do some work, and we can see that the Zorka log is generated under Zorka\log. But there is no trace of monitoring, note this sentence:

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

Therefore, you may also need to set the location of the monitoring files. In this page: http://zorka.io/install/tracer.html details the configuration and tuning methods of the trace. We choose the simplest to generate the monitoring record in the file system, in the Zorka.properties this file of these lines:

# Uncomment this to the Save tracer data in local file. Deprecated.
# Tracer.file = yes

Add some of our configurations below:

Tracer.file = Yestracer.file.path = Trace.trctracer.file.fnum = 8tracer.file.size = 128mtracer.net = no

And, of course, open the tracer: Tracer = yes.

In order to easily generate monitoring data, we make the following modifications:

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

Setting this two value to 0 o'clock ensures that all monitoring records are output, and then we reboot Tomcat and after doing something, You can see a trace.trc in the Tomcat bin directory, but I use the text editing software to open the future to see is garbled, still did not have time to study what kind of encoding. In order to facilitate everyone to reproduce, I put the revised zorka.properties file also passed up. Zorka.properties

These are some of the basic ways to use this tool, and it is simple to see that this tool supports configuration using the BeanShell scripting language, which is quite powerful.

Open source Java Monitoring Platform Zorka Basic use method

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.