Highlighted
Absent Member.
Absent Member.
182 views

Run several probe configurations from one installation

Hi all !

We are running Java Diagnostics 8.03 Probe + Mediator + Commander.
There is one diagnostics probe installation per application server.
Each server hosts many j2ee applications, several of them instrumented with diagnostics.

We would like to create a set of predefined diagnostics configurations that the applications can 'select' from at startup via e.g. a SystemProperty. All applications use the same Java version (1.5.x).

The properties to be different for each predefined configuration set are located in probe.properties, capture.properties, dynamic.properties and webserver.properties.

The question is if it is possible to run several applications with different configuration files from the same probe installation.

So we did several tests for a configuration set named 'tomcat'.
The most promising results are reported on here.

First we renamed some files in ./etc to *-tomcat.properties, see below.

Then we directed the probe to read modules-tomcat.properties instead of the original modules.properties by setting a system property on the JVM command line:

-Dmodules.properties.file=modules-tomcat.properties

In modules-tomcat.properties we specify some filenames
- probe.properties=probe-tomcat.properties
- capture.properties=capture-tomcat.properties
- dispatcher.properties=dispatcher-tomcat.properties
- probewebserver.properties=webserver-tomcat.properties

And in dispatcher-tomcat.properties:
- dynamic.properties.file.name=dynamic-tomcat.properties

As last step of the preparation we change some properties in each of the *-tomcat.properties files


Now we start the JVM (other system properties like group, id, points, libjvmti not listed here)

The corresponding log output is this (jvm stdout)
2010-02-23 14:43:23,258 INFO [com.mercury.opal.common.loader]: Loading modules-tomcat.properties from: /opt/HP/Diagnostics/JavaAgent/DiagnosticsAgent/lib/../etc/modules-tomcat.properties
Diagnostics webserver listening on 0.0.0.0:35005
(the port 35005 is configured in webserver-tomcat.properties)

And in probe.log (excerpts)

- This reflects definitions in dynamic-tomcat.properties:
2010-02-23 14:43:35,033 INFO com.mercury.opal.capture [main] Enabling stack trace sampling
2010-02-23 14:43:35,034 INFO com.mercury.opal.capture [main] New stack trace sampling interval is 52 milliseconds
2010-02-23 14:43:35,034 INFO com.mercury.opal.capture [main] New method latency threshold for stack trace sampling is 53 milliseconds

- This reflects definitions in capture-tomcat.properties
2010-02-23 14:43:35,258 INFO config [main] Overriding default property: capture-tomcat.properties.maximum.method.calls = 1010

- This reflects definitions in dispatcher-tomcat.properties
2010-02-23 14:43:35,259 INFO config [main] Overriding default property: dispatcher-tomcat.properties.byte.buffer.manager.allocate.direct = true
2010-02-23 14:43:35,259 INFO config [main] Overriding default property: dispatcher-tomcat.properties.dynamic.properties.file.name = dynamic-tomcat.properties



So, this seems to be working quite nicely, BUT:
The results cannot be verified with the probe console.

Jetty listens on port 35005 as configured and the console can connect, BUT:
- the console lists no instrumentation points
- the properties configured in dynamic-tomcat.properties are ignored (although the correct values where reported in probe.log at startup of the JVM)
Also, changes to dynamic-tomcat.properties are correctly detected and logged.

A truss -ftopen on the JVM while connecting the console showed that the probe tries to read e.g. dynamic.properties, but this file does not exist.
It seems the jetty application does not ask the probe for its current properties.
Rather it tries to figure out the configuration by itself, ignoring the -Dmodules.properties.file=modules-tomcat.properties system property set on the JVM command line.

So,
anybody any idea how to run multiple configurations from a single installation ?

Or is the Diagnositcs manual correct in stating that several installations are needed ?


Regards
Thomas
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.