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

Custom Host Names -Remove FQDN?

shakib
Participant

I have dozens and dozens of naming variations on FQDN in my host names where it's HOSTname.FQDN. These variations are messing with my automatic tagging rules. 

All I care about is the host name for each host to make my auto tagging rules be more effective. What would be the best way to tackle this? I'd like to trim everything to the right of the first dot in a host name. 

 

5 REPLIES 5

Moe_Azuz
Dynatrace Advisor
Dynatrace Advisor

Hi Shakib,

 

You should be able to do that using regex and Host Naming option, under Settings > Host naming. Here is a regex rule that should take care of anything after the first dot. {Host:DetectedName/([^\.]*+)}

 

This will be applied to the entire environment automatically so any hosts you instrument with the oneAgent and follow the same naming convention you mentioned, will only show the first part of the name up until the dot.

servername.datacenter.region > servername

 

Moe_Azuz_0-1655321737888.png

 

I hope this helps!

 

 

 

 

That worked like a charm! Thank you @Moe_Azuz!!

jon_kowalski
Dynatrace Supporter
Dynatrace Supporter

Hey Shakib,

 

Just to clarify your official ask here, what you are looking for is the ability you'd like to truncate the end of the Dynatrace detected hostname off (FQDN) in order to make your tagging more effective? 
Answer : Unfortunately truncating the detected host name is not a capability of the product.

I'd like to help understand and potentially solve the issue you seem to be having with your auto tagging rules not being as effective? What is it that you find ineffective about them and I can help with that information. Are you simply just trying to tag hosts with the portion of the detected host name to the left of the first dot? Are you trying to visually rename the host names altogether?

Let me know.

 

Jon

The tagging rules are a lot easier to implement and manage when the host names don't have the FQDN. I don't need the detected host name to change, I just needed the way the host names appear within the GUI to be without the FQDN. Moe's suggestion above gave me what I needed. Thank you, though 🙂 

techean
Dynatrace Pro
Dynatrace Pro

@shakib  you can follow what is suggested by @Moe_Azuz .

 

Refer this host naming blog for more details Improved custom host naming for large dynamic environments | Dynatrace news

KG