TL;DR; Where do I go to learn more about regular expression syntax used in variables to filter dashboard panels?
I’m using version 9.2.1. I’m trying to setup variables to only match certain interfaces on cisco switches. I’m not having luck with the regexes I’ve been trying. What regex language does grafana use for the query options under variables?
I’m trying to return interface names like:
Gi1/0/1
Gi2/0/2
Gi1/1
Te1/0/1
Te2/0/2
Te1/1
Po1
Po30
And exclude interface names with certain strings like “Controlled” and “Vl”.
I’m not certain if I should be using the regex to filter the response I want, or if it should be part of the query. I’m using label_values(ifName) to pull all of the interface names. I came up with “^(Gi|Te|Po)\d+((/\d+)+(.\d+)?)?” at regex101 using golang, but that doesn’t work in grafana and I don’t even know if it should.
The regex pseudo code would be, "(Gi or Te or Po) followed by digits and maybe a (/ and more digits) maybe repeated, excluding anything with strings “Controlled” and “Vl”…if that makes sense.