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

Follow Up Question to Regex/Host Group Name Post

Hey all,

I am back again and I am looking to try and tackle a newly revealed issue. So a week ago or so I asked this question in the forums which a lot of people helped out on and I was able to accomplish exactly what I set out to do. Everything was great and there was peace in the world... or so I thought.


As I started integrating the Host Group Name into the production environment some of the developers came to me and asked about missing platforms/tags in the environment. I asked them to show me some examples and as we went through, I realized that the reason they were missing is because some systems host multiple "applications" (applications based on the original post).


So in the original Host Group Name, I had a syntax like this:

env_app_role


This worked great until I ran into this specific issue. Apparently a single server can have multiple applications, up to 3 (current count so far). So theoretically, these are also possibilities:

env_app1_role
env_app1_app2_role
env_app1_app2_app3_role


I've tried a number of things to get this to work, even changing the Host Group Name and delineneators between tag types to make it easier. Examples include:

env_role-app1-
env_role-app1-app2-
env_role-app1-app2-app3-


And then by attempting to make the "Application" tag identify things between the `-` character but I have been unsuccessful. The closest I have come to matching what I need to match is the following:

Hosts get value '{HostGroup:Name/^.*?_.*?-(.*?)-$}' where Host group name exists
Hosts get value '{HostGroup:Name/^.*?_.*?-(.*?)-.*?-$}' where Host group name exists
Hosts get value '{HostGroup:Name/^.*?_.*?-(.*?)-.*?-.*?-$}' where Host group name exists
Hosts get value '{HostGroup:Name/^.*?_.*?-.*?-(.*?)-$}' where Host group name exists
Hosts get value '{HostGroup:Name/^.*?_.*?-.*?-(.*?)-.*?-$}' where Host group name exists
Hosts get value '{HostGroup:Name/^.*?_.*?-.*?-.*?-(.*?)-$}' where Host group name exists


So for example for the Host Group Name:

env_role-app1-app2-

I get the following results:

  • Application:
  • Application: app1
  • Application: app1-app2
  • Application: app2

For the Host Group Name:

env_role-app1-app2-app3-

I get the following results:

  • Application: app3
  • Application: app1
  • Application: app1-app2-app3
  • Application: app2
  • Application: app2-app3

I am probably using a very bizarre/off the wall usecase for Host Group Name which might be part of my problem, but I am trying to go as far as I can dynamically naming things to take the burden off the level 1 requirement of tagging hosts properly when adding systems to Dynatrace. Right now I have a nice system that takes Automatically applied Tags and puts systems, applications, and services into their proper management groups by simply installing the One Agent with a documented appropriate Host Group Name and if possible I would like to continue doing this.

3 REPLIES 3

Anonymous
Not applicable

You could do the same but at the process level.

I mean, host groups are great.... as long as the scope is right. I think is easier to add a tag to the host, based on what is hosting than to work with the host directly... what if tomorrow, one of those single app host shapes to a multi-app host.

I had the same situation, but I did not think that Host Group was the right answer since most of the environment in that company hosted more than one app/site on a single server and then OnPrem OpenShift comes along... or things like that (single multi docker Hosts) and HG stop being useful for micromanagement. I found it useful to divide unconfigured tomcats that showed up as clusters... and just things like that...

If you go to the process level, you add the tag to the host if the process is running in such host... and create an MZ rule to add it there, but the process as the root validation, and not the Host/Service.

In fact, you could start asking that your dev teams add the tags to the process level as an dt props and create autotags with that...

Hey Dante! I appreciate the feed back on this. Let me address a couple of your suggestions:

I think is easier to add a tag to the host, based on what is hosting than to work with the host directly... what if tomorrow, one of those single app host shapes to a multi-app host

While I understand what you are saying, the servers that have multiple applications present are mostly legacy and moving forward will most likely be cycled out. There were some enterprise licensing issues before that prevented the business from scaling appropriately so outside of things like database servers this is most likely not going to be an issue moving forward.


If you go to the process level, you add the tag to the host if the process is running in such host... and create an MZ rule to add it there, but the process as the root validation, and not the Host/Service.

There are certain things that going process level would not work for. The best example of this that I can provide is that one of the systems housing a multi-app configuration is a WebLogic platform. There are four applications on it and the biggest issue is there is little that differentiates the actually application itself. All four instances of the application run under "beasvc.exe" and they all use approximately the same amount of resources. Without some deeper logic and tearing apart the weblogic platform (which is not a maintained by us but rather a 3rd party developer) I do not see how I can identify and isolate the individual processes. To put this another way:

  • beasvc.exe: pid 10092 - Application 1
  • beasvc.exe: pid 9217 - Application 2
  • beasvc.exe: pid 11212 - Application 3
  • beasvc.exe: pid 4543 - Application 4
  • There is no promise that the PIDs will be the same every time the applications restart.

That being said, the real goal here is to break everything automatically into their own management groups which might make this an easier task however, I would have to be certain that all 4 Weblogic processes are part of the same management group and not maintained or oriented towards other management groups. If I could simply define the 4 applications that live on this server from the host level, I could simply just associate all 4 instances of the weblogic layer to all 4 management groups for the devs that are responsible.


In fact, you could start asking that your dev teams add the tags to the process level as an dt props and create autotags with that...

This is a big ask as the dev team is currently not skilled enough to deal with this. They barely understand the underpinnings and drivers/purpose for using an APM which is kind of why the engineering team (myself and a few others) have taken it upon ourselves to try and show them the value to the app.

Thank you very much for your perspective and I appreciate your insight!

Anonymous
Not applicable

I see, when working with WebLogic in our case we had the definition of application via each of the WebLogic domains. If they are working all inside the same domain, yeah out of luck unless you use one of the properties when WL spins up (if it shows, since you named beasvc i would assume that WG is running as service) in windows, you guys could check the startup bat i would think that they are different services? the script (if default should beWL_HOME\server\bin\installSvc.cmd or something like that)

When working with Dynatrace Regex, this might be of use: https://35.201.104.155/ a RegexEvaluator for DT.

Just a thing, remember that with K8 or Openshift/Docker you will have this problem again! (if you guys ever use that kind of platform).

Good luck and sorry couldn't be of any help!

Featured Posts