mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
25 lines
690 B
Text
25 lines
690 B
Text
{% import (
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/querytracer"
|
|
) %}
|
|
|
|
{% stripspace %}
|
|
SeriesResponse generates response for /api/v1/series.
|
|
See https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers
|
|
{% func SeriesResponse(mns []storage.MetricName, qt *querytracer.Tracer, qtDone func()) %}
|
|
{
|
|
"status":"success",
|
|
"data":[
|
|
{% for i := range mns %}
|
|
{%= metricNameObject(&mns[i]) %}
|
|
{% if i+1 < len(mns) %},{% endif %}
|
|
{% endfor %}
|
|
]
|
|
{% code
|
|
qt.Printf("generate response: series=%d", len(mns))
|
|
qtDone()
|
|
%}
|
|
{%= dumpQueryTrace(qt) %}
|
|
}
|
|
{% endfunc %}
|
|
{% endstripspace %}
|