Skip to content

Instantly share code, notes, and snippets.

@vutkin
Created November 25, 2022 11:38
Show Gist options
  • Save vutkin/926f6d4684f23e8c2075468468e0d179 to your computer and use it in GitHub Desktop.
Save vutkin/926f6d4684f23e8c2075468468e0d179 to your computer and use it in GitHub Desktop.
grafana var regexp for pods
get deployment from pods
/.*pod="(\b(?<!-)(?<value>[a-z0-9]+(?:-[a-z0-9]+)*?)(?:-([a-f0-9]{10}))?-([a-z0-9]+)\b(?!-))/g
ref
- https://docs.aws.amazon.com/grafana/latest/userguide/templates-and-variables.html
test:
- https://regex101.com/r/qRiJwA/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment