ATC Metric View "New Simple Alert from Metric" function creates regular expression with unnecessarily escaped dashes
search cancel

ATC Metric View "New Simple Alert from Metric" function creates regular expression with unnecessarily escaped dashes

book

Article ID: 275613

calendar_today

Updated On:

Products

CA Application Performance Management SaaS

Issue/Introduction

When the "New Simple Alert from Metric" function is used to create an alert and associated metric grouping, the regex generated for both agent specifier and metric specifier contains backslashes before each dash.  The dash is only every special when used as a character-class metacharacter (e.g. [a-f]).  The generated regexs do contain required escapes before all regex special characters such as |(). etc.   As a dash (outside character class which this function would never generate), always matches itself, prefixing with backslash adds nothing but makes less readable, the regex generated is 'valid' and matches intended patterns.

The following screen shot, shows this function being selected on metric path of:
SuperDomain|<host>|<Agent>|<Process-1>|Frontends|Apps|n1-n2-n3-n4:Average Block Time (ms)

The resultant regexs are:
Agent Specifier:   n1\-n2\-n3\-n4\|<Agent>\|Process\-1\
Metric Specifier:  Frontends\|Apps\|vn1\-n2\-n3\-n4:Average Block Time \(ms\)

The unnecessary escapes are highlighted above

Environment

Release : SAAS

Resolution

Fixed and will be part of SaaS 23.12 release.