$1 is a capture group - a parenthesised expression with the regexp - so you need to include the parentheses to capture the value you want:
regex: '(172*)' However, in a regexp, "*" means "zero or more instances of the preceeding character". So what you've written matches "17" followed by zero or more instances of "2", and that won't work. For example it would match 1722222 but not 172.1.2.3 What you want is "172" followed by zero or more of any character, which is: regex: '(172.*)' Dot in a regexp has a special meaning of "any character". If you want to match "172." followed by anything, then to match a literal dot without backslash hell I'd do: regex: '(172[.].*)' -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/327c577a-4d9d-4ada-b0df-fd0dbd5f5e2c%40googlegroups.com.

