serDrem commented on code in PR #7302:
URL: https://github.com/apache/trafficcontrol/pull/7302#discussion_r1085672706


##########
traffic_monitor/cache/astats.go:
##########
@@ -116,8 +117,23 @@ func astatsParse(cacheName string, rdr io.Reader, pollCTX 
interface{}) (Statisti
                astats.Ats["system.proc.loadavg"] = astats.System.ProcLoadavg
                astats.Ats["system.proc.net.dev"] = astats.System.ProcNetDev
 
+               via := ctx.HTTPHeader.Get("Via")
+               if via != "" {
+                       result := regexp.MustCompile(` 
([a-z0-9\-]*)\..*comcast.net`).FindStringSubmatch(via)
+                       if len(result) > 0 {
+                               astats.Ats["via"] = result[1]

Review Comment:
   result[0] is the whole match, and result[1] is the selection.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to