17 Sep 2025 07:57 PM - edited 18 Sep 2025 01:49 PM
I am working on an Auto Tag rule for custom devices using a regular expression statement which for the most part is successful. I am seeing though where the tag key gets duplicated, with either no value, or a value which was to be excluded from the result.
Example #1 -
{CustomDevice:Name/^([A-Za-z][A-Za-z][A-Za-z])}
Using CMHLEAF123.test.com as the entity name, the results are -
The rule correctly captures the three letter code used for the tag key, as seen in the "Site Code:CMH" tag, however I'm not exactly sure how the tag, "Site Code", with no value assigned, is applied. I have no rule which suggests this.
Example #2 -
{CustomDevice:Name/(?:Cisco network device) ([A-Za-z][A-Za-z][A-Za-z])}
Using Cisco network device CMHLEAF123.test.com as the entity name, the results are -
In this example, the rule correctly captures the three letter code used for the tag value, as seen in the "Site Code:CMH" tag, however I'm not exactly sure how the tag, "Site Code:CIS" is created especially since I've specifically excluded the additional text in the regular expression statement.
The first example occurs not just for the Site Code tag, but for other tags as well, as seen with the "Host group" tag.
I am looking for suggestions from the community on this.