Documentation ¶
Index ¶
- func DeleteHandler(startTime time.Time, r *http.Request) error
- func ErrorResponse(statusCode int, err error) string
- func ExpandWithExprs(w http.ResponseWriter, r *http.Request)
- func ExpandWithExprsJSONResponse(q string) string
- func ExpandWithExprsResponse(q string) string
- func ExportCSVHandler(startTime time.Time, w http.ResponseWriter, r *http.Request) error
- func ExportCSVLine(xb *exportBlock, fieldNames []string) string
- func ExportHandler(startTime time.Time, w http.ResponseWriter, r *http.Request) error
- func ExportJSONLine(xb *exportBlock) string
- func ExportNativeHandler(startTime time.Time, w http.ResponseWriter, r *http.Request) error
- func ExportPromAPIFooter(qt *querytracer.Tracer) string
- func ExportPromAPIHeader() string
- func ExportPromAPILine(xb *exportBlock) string
- func ExportPrometheusLine(xb *exportBlock) string
- func Federate(rs *netstorage.Result) string
- func FederateHandler(startTime time.Time, w http.ResponseWriter, r *http.Request) error
- func LabelValuesHandler(qt *querytracer.Tracer, startTime time.Time, labelName string, ...) error
- func LabelValuesResponse(labelValues []string, qt *querytracer.Tracer) string
- func LabelsHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, ...) error
- func LabelsResponse(labels []string, qt *querytracer.Tracer) string
- func PrettifyQuery(w http.ResponseWriter, r *http.Request)
- func QueryHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, ...) error
- func QueryRangeHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, ...) error
- func QueryRangeResponse(rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), ...) string
- func QueryResponse(rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), ...) string
- func QueryStatsHandler(startTime time.Time, w http.ResponseWriter, r *http.Request) error
- func SeriesCountHandler(startTime time.Time, w http.ResponseWriter, r *http.Request) error
- func SeriesCountResponse(n uint64) string
- func SeriesHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, ...) error
- func SeriesResponse(metricNames []string, qt *querytracer.Tracer, qtDone func()) string
- func StreamErrorResponse(qw422016 *qt422016.Writer, statusCode int, err error)
- func StreamExpandWithExprsJSONResponse(qw422016 *qt422016.Writer, q string)
- func StreamExpandWithExprsResponse(qw422016 *qt422016.Writer, q string)
- func StreamExportCSVLine(qw422016 *qt422016.Writer, xb *exportBlock, fieldNames []string)
- func StreamExportJSONLine(qw422016 *qt422016.Writer, xb *exportBlock)
- func StreamExportPromAPIFooter(qw422016 *qt422016.Writer, qt *querytracer.Tracer)
- func StreamExportPromAPIHeader(qw422016 *qt422016.Writer)
- func StreamExportPromAPILine(qw422016 *qt422016.Writer, xb *exportBlock)
- func StreamExportPrometheusLine(qw422016 *qt422016.Writer, xb *exportBlock)
- func StreamFederate(qw422016 *qt422016.Writer, rs *netstorage.Result)
- func StreamLabelValuesResponse(qw422016 *qt422016.Writer, labelValues []string, qt *querytracer.Tracer)
- func StreamLabelsResponse(qw422016 *qt422016.Writer, labels []string, qt *querytracer.Tracer)
- func StreamQueryRangeResponse(qw422016 *qt422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, ...)
- func StreamQueryResponse(qw422016 *qt422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, ...)
- func StreamSeriesCountResponse(qw422016 *qt422016.Writer, n uint64)
- func StreamSeriesResponse(qw422016 *qt422016.Writer, metricNames []string, qt *querytracer.Tracer, ...)
- func StreamTSDBStatusResponse(qw422016 *qt422016.Writer, status *storage.TSDBStatus, qt *querytracer.Tracer)
- func TSDBStatusHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, ...) error
- func TSDBStatusResponse(status *storage.TSDBStatus, qt *querytracer.Tracer) string
- func WriteErrorResponse(qq422016 qtio422016.Writer, statusCode int, err error)
- func WriteExpandWithExprsJSONResponse(qq422016 qtio422016.Writer, q string)
- func WriteExpandWithExprsResponse(qq422016 qtio422016.Writer, q string)
- func WriteExportCSVLine(qq422016 qtio422016.Writer, xb *exportBlock, fieldNames []string)
- func WriteExportJSONLine(qq422016 qtio422016.Writer, xb *exportBlock)
- func WriteExportPromAPIFooter(qq422016 qtio422016.Writer, qt *querytracer.Tracer)
- func WriteExportPromAPIHeader(qq422016 qtio422016.Writer)
- func WriteExportPromAPILine(qq422016 qtio422016.Writer, xb *exportBlock)
- func WriteExportPrometheusLine(qq422016 qtio422016.Writer, xb *exportBlock)
- func WriteFederate(qq422016 qtio422016.Writer, rs *netstorage.Result)
- func WriteLabelValuesResponse(qq422016 qtio422016.Writer, labelValues []string, qt *querytracer.Tracer)
- func WriteLabelsResponse(qq422016 qtio422016.Writer, labels []string, qt *querytracer.Tracer)
- func WriteQueryRangeResponse(qq422016 qtio422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, ...)
- func WriteQueryResponse(qq422016 qtio422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, ...)
- func WriteSeriesCountResponse(qq422016 qtio422016.Writer, n uint64)
- func WriteSeriesResponse(qq422016 qtio422016.Writer, metricNames []string, qt *querytracer.Tracer, ...)
- func WriteTSDBStatusResponse(qq422016 qtio422016.Writer, status *storage.TSDBStatus, qt *querytracer.Tracer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteHandler ¶
DeleteHandler processes /api/v1/admin/tsdb/delete_series prometheus API request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#delete-series
func ErrorResponse ¶
func ExpandWithExprs ¶ added in v1.85.2
func ExpandWithExprs(w http.ResponseWriter, r *http.Request)
ExpandWithExprs handles the request to /expand-with-exprs
func ExpandWithExprsJSONResponse ¶ added in v1.91.0
func ExpandWithExprsResponse ¶ added in v1.85.2
func ExportCSVHandler ¶ added in v1.44.0
ExportCSVHandler exports data in CSV format from /api/v1/export/csv
func ExportCSVLine ¶ added in v1.44.0
func ExportHandler ¶
ExportHandler exports data in raw format from /api/v1/export.
func ExportJSONLine ¶
func ExportJSONLine(xb *exportBlock) string
func ExportNativeHandler ¶ added in v1.42.0
ExportNativeHandler exports data in native format from /api/v1/export/native.
func ExportPromAPIFooter ¶ added in v1.82.0
func ExportPromAPIFooter(qt *querytracer.Tracer) string
func ExportPromAPIHeader ¶ added in v1.82.0
func ExportPromAPIHeader() string
func ExportPromAPILine ¶
func ExportPromAPILine(xb *exportBlock) string
func ExportPrometheusLine ¶
func ExportPrometheusLine(xb *exportBlock) string
func Federate ¶
func Federate(rs *netstorage.Result) string
func FederateHandler ¶
FederateHandler implements /federate . See https://prometheus.io/docs/prometheus/latest/federation/
func LabelValuesHandler ¶
func LabelValuesHandler(qt *querytracer.Tracer, startTime time.Time, labelName string, w http.ResponseWriter, r *http.Request) error
LabelValuesHandler processes /api/v1/label/<labelName>/values request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#querying-label-values
func LabelValuesResponse ¶
func LabelValuesResponse(labelValues []string, qt *querytracer.Tracer) string
func LabelsHandler ¶
func LabelsHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, r *http.Request) error
LabelsHandler processes /api/v1/labels request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#getting-label-names
func LabelsResponse ¶
func LabelsResponse(labels []string, qt *querytracer.Tracer) string
func PrettifyQuery ¶ added in v1.94.0
func PrettifyQuery(w http.ResponseWriter, r *http.Request)
PrettifyQuery handles the request /prettify-query
func QueryHandler ¶
func QueryHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, r *http.Request) error
QueryHandler processes /api/v1/query request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries
func QueryRangeHandler ¶
func QueryRangeHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, r *http.Request) error
QueryRangeHandler processes /api/v1/query_range request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries
func QueryRangeResponse ¶
func QueryRangeResponse(rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), qs *promql.QueryStats) string
func QueryResponse ¶
func QueryResponse(rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), qs *promql.QueryStats) string
func QueryStatsHandler ¶ added in v1.51.0
QueryStatsHandler returns query stats at `/api/v1/status/top_queries`
func SeriesCountHandler ¶
SeriesCountHandler processes /api/v1/series/count request.
func SeriesCountResponse ¶
func SeriesHandler ¶
func SeriesHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, r *http.Request) error
SeriesHandler processes /api/v1/series request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers
func SeriesResponse ¶
func SeriesResponse(metricNames []string, qt *querytracer.Tracer, qtDone func()) string
func StreamErrorResponse ¶
func StreamExpandWithExprsJSONResponse ¶ added in v1.91.0
func StreamExpandWithExprsResponse ¶ added in v1.85.2
func StreamExportCSVLine ¶ added in v1.44.0
func StreamExportJSONLine ¶
func StreamExportPromAPIFooter ¶ added in v1.82.0
func StreamExportPromAPIFooter(qw422016 *qt422016.Writer, qt *querytracer.Tracer)
func StreamExportPromAPIHeader ¶ added in v1.82.0
func StreamExportPromAPILine ¶
func StreamFederate ¶
func StreamFederate(qw422016 *qt422016.Writer, rs *netstorage.Result)
func StreamLabelValuesResponse ¶
func StreamLabelValuesResponse(qw422016 *qt422016.Writer, labelValues []string, qt *querytracer.Tracer)
func StreamLabelsResponse ¶
func StreamLabelsResponse(qw422016 *qt422016.Writer, labels []string, qt *querytracer.Tracer)
func StreamQueryRangeResponse ¶
func StreamQueryRangeResponse(qw422016 *qt422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), qs *promql.QueryStats)
func StreamQueryResponse ¶
func StreamQueryResponse(qw422016 *qt422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), qs *promql.QueryStats)
func StreamSeriesResponse ¶
func StreamSeriesResponse(qw422016 *qt422016.Writer, metricNames []string, qt *querytracer.Tracer, qtDone func())
func StreamTSDBStatusResponse ¶ added in v1.35.0
func StreamTSDBStatusResponse(qw422016 *qt422016.Writer, status *storage.TSDBStatus, qt *querytracer.Tracer)
func TSDBStatusHandler ¶ added in v1.35.0
func TSDBStatusHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseWriter, r *http.Request) error
TSDBStatusHandler processes /api/v1/status/tsdb request.
See https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-stats
It can accept `match[]` filters in order to narrow down the search.
func TSDBStatusResponse ¶ added in v1.35.0
func TSDBStatusResponse(status *storage.TSDBStatus, qt *querytracer.Tracer) string
func WriteErrorResponse ¶
func WriteErrorResponse(qq422016 qtio422016.Writer, statusCode int, err error)
func WriteExpandWithExprsJSONResponse ¶ added in v1.91.0
func WriteExpandWithExprsJSONResponse(qq422016 qtio422016.Writer, q string)
func WriteExpandWithExprsResponse ¶ added in v1.85.2
func WriteExpandWithExprsResponse(qq422016 qtio422016.Writer, q string)
func WriteExportCSVLine ¶ added in v1.44.0
func WriteExportCSVLine(qq422016 qtio422016.Writer, xb *exportBlock, fieldNames []string)
func WriteExportJSONLine ¶
func WriteExportJSONLine(qq422016 qtio422016.Writer, xb *exportBlock)
func WriteExportPromAPIFooter ¶ added in v1.82.0
func WriteExportPromAPIFooter(qq422016 qtio422016.Writer, qt *querytracer.Tracer)
func WriteExportPromAPIHeader ¶ added in v1.82.0
func WriteExportPromAPIHeader(qq422016 qtio422016.Writer)
func WriteExportPromAPILine ¶
func WriteExportPromAPILine(qq422016 qtio422016.Writer, xb *exportBlock)
func WriteExportPrometheusLine ¶
func WriteExportPrometheusLine(qq422016 qtio422016.Writer, xb *exportBlock)
func WriteFederate ¶
func WriteFederate(qq422016 qtio422016.Writer, rs *netstorage.Result)
func WriteLabelValuesResponse ¶
func WriteLabelValuesResponse(qq422016 qtio422016.Writer, labelValues []string, qt *querytracer.Tracer)
func WriteLabelsResponse ¶
func WriteLabelsResponse(qq422016 qtio422016.Writer, labels []string, qt *querytracer.Tracer)
func WriteQueryRangeResponse ¶
func WriteQueryRangeResponse(qq422016 qtio422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), qs *promql.QueryStats)
func WriteQueryResponse ¶
func WriteQueryResponse(qq422016 qtio422016.Writer, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func(), qs *promql.QueryStats)
func WriteSeriesCountResponse ¶
func WriteSeriesCountResponse(qq422016 qtio422016.Writer, n uint64)
func WriteSeriesResponse ¶
func WriteSeriesResponse(qq422016 qtio422016.Writer, metricNames []string, qt *querytracer.Tracer, qtDone func())
func WriteTSDBStatusResponse ¶ added in v1.35.0
func WriteTSDBStatusResponse(qq422016 qtio422016.Writer, status *storage.TSDBStatus, qt *querytracer.Tracer)
Types ¶
This section is empty.
Source Files ¶
- app/vmselect/prometheus/error_response.qtpl
- app/vmselect/prometheus/expand-with-exprs.qtpl
- app/vmselect/prometheus/export.qtpl
- app/vmselect/prometheus/federate.qtpl
- app/vmselect/prometheus/label_values_response.qtpl
- app/vmselect/prometheus/labels_response.qtpl
- app/vmselect/prometheus/query_range_response.qtpl
- app/vmselect/prometheus/query_response.qtpl
- app/vmselect/prometheus/series_count_response.qtpl
- app/vmselect/prometheus/series_response.qtpl
- app/vmselect/prometheus/tsdb_status_response.qtpl
- app/vmselect/prometheus/util.qtpl
- prometheus.go