mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-13 17:14:05 -08:00
5adcec3018
This exposes samples via the console templates in the text exposition format, which the parser will fall back to. This is not a proper federation solution, but should tide us over for now. Extenions could include passing in a query or queries in the url parameters.
4 lines
351 B
Plaintext
4 lines
351 B
Plaintext
{{/* Adjust the query below to select the samples to expose. */}}
|
|
{{ range query "{__name__=~'^job:.*'}" }}
|
|
{{ .Labels.__name__ }}{{ "{" }}{{ range $k, $v := .Labels }}{{ if ne "__name__" $k }}{{ $k }}="{{ $v | reReplaceAll "([\\\\\"])" "\\$1" | reReplaceAll "\n" "\\n"| safeHtml }}",{{ end }}{{ end }}{{ "}" }} {{ print .Value | safeHtml }}{{ end }}
|