cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to filter processes for java version?

mdouds
Helper

I'm looking for a way to find all of the process groups with java version 11. 

 

The Infrastructure > Technologies & processes screen does not let you specify versions in the filter.


We thought about creating an auto tag as there is a "Technology Version" condition. 

Using this as an example:

mdouds_0-1634835305161.png

We cannot use Technology version contains "OpenJDK 11", because the word "OpenJDK" is not present in the "version" field:

 

"type": "JAVA",
"edition": "OpenJDK",
"version": "11.0.11"

 

Sure enough, Technology Version contains "OpenJDK 11" returns 0 matches.

 

If I move the OpenJDK to its own condition:

 Technology Edition equals "OpenJDK" 

 Technology Version begins with "11"

 

then we could see version matches coming from other technologies, like this hypothetical:

 

Garden, Java (OpenJDK 10), SomeOtherClient (11.0.6), reactor-core (3.3.17.RELEASE)

 

Is there any way to find an exact match where a specific technology edition has to match a specific version?

7 REPLIES 7

r_weber
DynaMight Champion
DynaMight Champion

Hi @mdouds ,

 

you could do that via the API and an entitySelector on a attribute of a process group instance like so:

/api/v2/entities?entitySelector=type(PROCESS_GROUP_INSTANCE),processType("JAVA"),jvmClrVersion("1.8.0_261")

Unfortunately the attribute selector doesn't have any contains but only exact matches.

But what you could do is maybe create an entityselector based tagging rule and then based on this tag perform the next tagging with "begins", "contains".

 

kr,

Reinhard
  

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

No luck using this approach. The processes using OpenJDK are not reporting a jvmClrVersion property. 

  • Works: Java (IBM 1.8.0_271 SR6 FP20)
  • Does not work: Java (OpenJDK 1.8.0_292)

r_weber
DynaMight Champion
DynaMight Champion

I quickly fired up an API request here, with this selector:

type(PROCESS_GROUP_INSTANCE),jvmVendor("OpenJDK")
"properties": {
            "awsNameTag": "SAP Hybris",
            "bitness": "64",
            "detectedName": "tomcat",
            "installerVersion": "1.225.146.20210929-151104",
            "jvmClrVersion": "11.0.12",
            "jvmVendor": "OpenJDK",
            "listenPorts": [
                9001
            ],
            ...
}

 

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

Hello,

 

Maybe java included with springboot does not include jvmVendor or clr version. I get zero results for that entitySelector, and when viewing a specific java process, see no jvm* property.

 

{
  "entityId": "xxxxxxxxx",
  "displayName": "xxxxxxxx",
  "firstSeenTms": 1634709420000,
  "lastSeenTms": 1635173340000,
  "properties": {
    "bitness": "64",
    "detectedName": "xxxxxxxx",
    "metadata": [
      xxxxxx
    ],
    "installerVersion": "1.219.156.20210713-151838",
    "awsNameTag": "xxxxxxxx",
    "softwareTechnologies": [
      {
        "type": "GARDEN"
      },
      {
        "type": "JAVA"
      },
      {
        "type": "SPRING",
        "edition": "WebFlux HTTP client",
        "version": "5.2.15.RELEASE"
      },
      {
        "type": "NETTY",
        "edition": "HTTP Server",
        "version": "4.1.65.Final"
      },
      {
        "type": "REACTOR_CORE",
        "version": "3.3.17.RELEASE"
      },
      {
        "type": "JAVA",
        "edition": "OpenJDK",
        "version": "11.0.11"
      }
    ],
    "processType": "JAVA",

 

Hello,

 

I ran the same entity selector command for our environment and got 0 results. If I call /v2/entities/<process instance id> on one of these PI's, there is no property starting with jvm. 

 

The only place that mentions the java version is in the softwareTechnologies array:

 

...
    "awsNameTag": "xxxxxxxx",
    "softwareTechnologies": [
      {
        "type": "GARDEN"
      },
      {
        "type": "JAVA"
      },
      {
        "type": "SPRING",
        "edition": "WebFlux HTTP client",
        "version": "5.2.15.RELEASE"
      },
      {
        "type": "NETTY",
        "edition": "HTTP Server",
        "version": "4.1.65.Final"
      },
      {
        "type": "REACTOR_CORE",
        "version": "3.3.17.RELEASE"
      },
      {
        "type": "JAVA",
        "edition": "OpenJDK",
        "version": "11.0.11"
      }
    ],
    "processType": "JAVA",
...

 

ct_27
DynaMight Pro
DynaMight Pro

Dear Dynatrace: This is another instance where it would be useful to allow us to use Properties as Tags. This information is available in the Process Group Instance properties.

 

This is the 4th or 5th time I'm writing tagging rules to extract properties information.  This shouldn't even be necessary.

 

This is just the draft but we have a tagging rule that gets the EXEpath data for a process group then extracts the version "{ProcessGroup:ExePath/openjdk-(\d+?\.*?\d+\.*?\d+\.*?\d+)}".   I need to make the Regex more robust and add additional conditions for non openjdk and java11 etc. but it works.  Also, Dynatrace auto tags the Process Group Instance even though your rule is applied to Process Groups (undocumented but that's what it does)

HigherEd

Featured Posts