We are trying to set up a bunch of triggers with tags. Most of them we are able to set at the template level. The problem we face is trying to set a LOCATION tag which is based on a portion of the host name. I tried to set up a tag with the value something like {{HOST.HOST}.regsub("^[aA-zZ]+\d-[aA-zZ]+\d")} but all I ended up getting was the hostname with the regex piece appended to it. The documentation is a bit conflicting in that it says you can use all of the built in macros as both tag and tag value but at the same says you can only use regex on ITEM.VALUE or ITEM.LASTVALUE. I even tried setting a template macro with the regsub and I got the same result. Is this even possible? Here's an example. If my host name is tgaux1-rm1-pdu-a1b.network.com I want the "Location" tag to be set to "tgaux-rm1" . The regex works, but the macros or even the tags don't seem to accept it.
Ad Widget
Collapse
{HOST.NAME}.regsub() for tag value?
Collapse
X
Comment