mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 23:42:32 +00:00
Proof of concept for federation via console templates.
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.
This commit is contained in:
parent
c069c0dafa
commit
5adcec3018
3
consoles/federation_template_example.txt
Normal file
3
consoles/federation_template_example.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{{/* 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 }}
|
Loading…
Reference in New Issue
Block a user