I have a problem with automatically applied tags. I guess it's a simple question, and yet I can't figure it out. We have a special name convention for our server names. The second digit of the host name means the stage in which the server is located (production, pre-procurement, etc.). Is it possible to create an automatically applied tag rule based on the hostname, depending on the value of the second digit of the host?
Example hostname: S45002134A (second character "4" means pre-production)
To create the rule:
- Rule applies to: "hosts"
- Condition: "Hostname" "begins with" (or "contains")
What needs to be entered in the field? I need kind of a placeholder for the first digit because the it changes based on other conditions.
Solved! Go to Solution.
Rule applies to: "hosts"
Condition: "Host name" "contains regex"
This might also work. It should match the second character of a string depending on what is in the square brackets.