|
In the Java instrumentation tools, we've been using Kieker, this simple study another Java monitoring platform Zorka, here for Windows + Tomcat as an example the record about the basic installation process:
Its home page is: http: //zorka.io/,GitHub on the project's home page is: https: //github.com/jitlogic/zorka, has its Agent download page end on its home page: http: //zorka.io /downloads.html. Zorka-1.0.11.zip download and unpack. Unzip the file folder after copy to the Tomcat root directory and rename it to "zorka" (easy to set up follow-up).
On this page: http: //zorka.io/install/index.html introduces Zorka installation and configuration, but I still find some place to put it is not clear in the configuration process: First, according to the official website of the introduction, after extracting the file folder should contain about content:
. By convention zorka files reside in / 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 will be stored here;
templates / * - templates for zabbix (and maybe other monitoring systems); this directory is not used by agent itself and can be safely removed after installation;
zorka.properties - main configuration file;
But it is strange, I do not see the scripts folder. To continue to look down: according to http://zorka.io/install/tomcat.html introduced here, the need for a series of modifications zorka.properties this document, you should first add this line:
scripts = jvm.bsh, zabbix.bsh, apache / tomcat.bsh
Obviously, this is a reference to some bsh script, but simply do not see the bsh file ah. Like a long time, I decided to look for from GitHub, and sure enough here: zorka-master \ zorka-core \ target \ classes \ com \ jitlogic \ zorka \ scripts find a lot bsh file, copy the whole folder to just " zorka "folder. It can achieve a normal references.
Secondly, we should modify the Tomcat startup options for windows, it should modify catalina.bat bin directory, added in its proper position:
set JAVA_OPTS =% JAVA_OPTS% -javaagent:% CATALINA_BASE% \ zorka \ zorka.jar -Dzorka.home.dir =% CATALINA_BASE% \ zorka
Note written here and the official line is slightly different.
Just Tomcat installation in accordance with the method of that page, in zorka.properties this file add the following:
zorka.spy.compute.frames = yes
This line. After modifying, we try to start Tomcat and some operations can be found in zorka \ log swells became Zorka logs. But it does not have any monitoring Trace, noticed this sentence:
adjust other settings in zorka.properties if necessary (log files, listen port number etc.);
You may also need to set the file position monitoring. On this page: http: //zorka.io/install/tracer.html Details of Trace configuration and tuning methods. We chose the most simple monitoring records generated in the file system, in zorka.properties this file these lines:
# Uncomment this to save tracer data in local file. Deprecated.
# Tracer.file = yes
Here we add some configuration:
tracer.file = yes
tracer.file.path = trace.trc
tracer.file.fnum = 8
tracer.file.size = 128M
tracer.net = no
Of course, but also to open Tracer: tracer = yes.
To make it easy to generate monitoring data, we make the following changes:
tracer.min.trace.time = 0
tracer.min.method.time = 0
This two value is set to 0, it can ensure that all monitoring records for output, this time we restart Tomcat, do something, you can see a trace.trc in Tomcat's bin directory, but I text editor to open later to see is garbled, not enough time to study what kind of encoding. In order to facilitate reproduction, I zorka.properties revised document also pass up. |
|
|
|