Last active
June 16, 2023 21:19
-
-
Save cvvs/de886c257e49136055913cf076285fdc to your computer and use it in GitHub Desktop.
NuShell Goodness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Grug Parse Prometheus Metrics | |
# Add other labels of interest (this matches too, eg, my_label1 and label1 would both match) | |
http get http://host.example.com | lines | where { |line| $line !~ '$'^#' } | parse -r '^(?P<metric>\w+)\{.*label1="(?P<label1>\w+)".*} (?<value>[\de\.\+]+)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment