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

Auto Tag Rule but Modify the Value and Apply the Result

sivart_89
Mentor

Hey everyone, I'm wondering if it is possible to create an auto tagging rule but apply some logic to it to remove some characters and insert a space, then use the result of that for the tag value. My example is below. 

original value:
SERVERENV (via: server)

what i'm hoping to get:
SERVER ENV

OR i will accept:
SERVER\ENV

6 REPLIES 6

tibebe_m_digafe
Advisor

Hello,

What you could do for value is limited to a few predefined "properties" you can regex on .. or a static value. 

Example:  

{ProcessGroup:KubernetesNamespace/([^-].+?-.+?)-}

Unfortunately, the kind of functionality you are asking for with additional enhancements would be a very useful feature.  

 

 

Hi @tibebe_m_digafe,

Do you know if that can be applied to tags as service naming rules?

Best regards 

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

@AntonPineiro yes, you can apply it at the naming level, You can also add in strings with regex, Example, you could parse out the first part of the Services String and add in part of the Host Group Name for a Result of "EzTravel Check out - Front End"

-Chad

Thank you @ChadTurner, yes, @tibebe_m_digafe was able to confirm it to me with his example.

Thank you both, appreciate it 😎

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

tibebe_m_digafe
Advisor

Hi @anton 

If I understood your question, the example I provided earlier was for auto-tagging. 

it will extract the first 2 "words" from k8s namespace (name uses "-" separator)

xyz-123-crf-456 => xyz-123 (this is then assigned as value for the tag).

 

tibebe_m_digafe_0-1686085631801.png

 

 

Hi,

Yes, I was talking about that. That regex can be applied in more placeholders.

Thank you for your answer!

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Featured Posts