21 Oct 2021 06:05 PM
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:
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?
Solved! Go to Solution.
22 Oct 2021 12:24 PM
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
22 Oct 2021 02:20 PM
No luck using this approach. The processes using OpenJDK are not reporting a jvmClrVersion property.
22 Oct 2021 02:22 PM
22 Oct 2021 06:55 PM
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
],
...
}
25 Oct 2021 03:59 PM
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",
25 Oct 2021 05:56 PM - edited 25 Oct 2021 05:58 PM
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",
...
01 Apr 2022 08:49 PM - edited 01 Apr 2022 08:50 PM
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)
03 Oct 2024 09:56 AM
Hi @Babar_Qayyum ,
You can refer to the process I just posted on this thread.
It should probably help.
03 Oct 2024 09:52 AM
Hi @mdouds ,
Not sure if you have tried this already but this can be achieved using DQL.
If you are on the latest version of Dynatrace SaaS and you have Grail enabled, just go to Notebooks, Create new Notebook, add DQL query and try this.
fetch dt.entity.process_group
| fieldsAdd softwareTechnologies
| expand softwareTechnologies
| filterOut isNull(softwareTechnologies)
| filter matchesPhrase(softwareTechnologies,"JAVA")
| parse softwareTechnologies,"\"type:JAVA,edition:\"LD:edition\",version:\"LD:version"
Now you'll have a filed called version and using that you can filter out required version of JAVA.
for example,
fetch dt.entity.process_group
| fieldsAdd softwareTechnologies
| expand softwareTechnologies
| filterOut isNull(softwareTechnologies)
| filter matchesPhrase(softwareTechnologies,"JAVA")
| parse softwareTechnologies,"\"type:JAVA,edition:\"LD:edition\",version:\"LD:version"
| filter version == "11"
filters and displays only process groups that are on version 11.
Note: This version field is a string and if you use contains like this
fetch dt.entity.process_group
| fieldsAdd softwareTechnologies
| expand softwareTechnologies
| filterOut isNull(softwareTechnologies)
| filter matchesPhrase(softwareTechnologies,"JAVA")
| parse softwareTechnologies,"\"type:JAVA,edition:\"LD:edition\",version:\"LD:version"
| filter matchesPhrase(version,"11")
It does list out all the version strings with 11 as part of which means all 11.xx versions are covered but also if a version is 17.0.11 that is also covered so play around with caution.
Regards,
@Maheedhar_T