prometheus

package
v1.79.13-cluster Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteHandler

func DeleteHandler(startTime time.Time, at *auth.Token, r *http.Request) error

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 ErrorResponse(statusCode int, err error) string

func ExportCSVHandler added in v1.44.0

func ExportCSVHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r *http.Request) error

ExportCSVHandler exports data in CSV format from /api/v1/export/csv

func ExportCSVLine added in v1.44.0

func ExportCSVLine(xb *exportBlock, fieldNames []string) string

func ExportHandler

func ExportHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r *http.Request) error

ExportHandler exports data in raw format from /api/v1/export.

func ExportJSONLine

func ExportJSONLine(xb *exportBlock) string

func ExportNativeHandler added in v1.42.0

func ExportNativeHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r *http.Request) error

ExportNativeHandler exports data in native format from /api/v1/export/native.

func ExportPromAPILine

func ExportPromAPILine(xb *exportBlock) string

func ExportPromAPIResponse

func ExportPromAPIResponse(resultsCh <-chan *quicktemplate.ByteBuffer, qt *querytracer.Tracer) string

func ExportPrometheusLine

func ExportPrometheusLine(xb *exportBlock) string

func ExportStdResponse

func ExportStdResponse(resultsCh <-chan *quicktemplate.ByteBuffer, qt *querytracer.Tracer) string

func Federate

func Federate(rs *netstorage.Result) string

func FederateHandler

func FederateHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r *http.Request) error

FederateHandler implements /federate . See https://prometheus.io/docs/prometheus/latest/federation/

func LabelValuesHandler

func LabelValuesHandler(qt *querytracer.Tracer, startTime time.Time, at *auth.Token, 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(isPartial bool, labelValues []string, qt *querytracer.Tracer) string

func LabelsHandler

func LabelsHandler(qt *querytracer.Tracer, startTime time.Time, at *auth.Token, 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(isPartial bool, labels []string, qt *querytracer.Tracer) string

func QueryHandler

func QueryHandler(qt *querytracer.Tracer, startTime time.Time, at *auth.Token, 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, at *auth.Token, 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(isPartial bool, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func()) string

func QueryResponse

func QueryResponse(isPartial bool, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func()) string

func QueryStatsHandler added in v1.51.0

func QueryStatsHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r *http.Request) error

QueryStatsHandler returns query stats at `/api/v1/status/top_queries`

func SeriesCountHandler

func SeriesCountHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r *http.Request) error

SeriesCountHandler processes /api/v1/series/count request.

func SeriesCountResponse

func SeriesCountResponse(isPartial bool, n uint64) string

func SeriesHandler

func SeriesHandler(qt *querytracer.Tracer, startTime time.Time, at *auth.Token, 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(isPartial bool, metricNames []string, qt *querytracer.Tracer, qtDone func()) string

func StreamErrorResponse

func StreamErrorResponse(qw422016 *qt422016.Writer, statusCode int, err error)

func StreamExportCSVLine added in v1.44.0

func StreamExportCSVLine(qw422016 *qt422016.Writer, xb *exportBlock, fieldNames []string)

func StreamExportJSONLine

func StreamExportJSONLine(qw422016 *qt422016.Writer, xb *exportBlock)

func StreamExportPromAPILine

func StreamExportPromAPILine(qw422016 *qt422016.Writer, xb *exportBlock)

func StreamExportPromAPIResponse

func StreamExportPromAPIResponse(qw422016 *qt422016.Writer, resultsCh <-chan *quicktemplate.ByteBuffer, qt *querytracer.Tracer)

func StreamExportPrometheusLine

func StreamExportPrometheusLine(qw422016 *qt422016.Writer, xb *exportBlock)

func StreamExportStdResponse

func StreamExportStdResponse(qw422016 *qt422016.Writer, resultsCh <-chan *quicktemplate.ByteBuffer, qt *querytracer.Tracer)

func StreamFederate

func StreamFederate(qw422016 *qt422016.Writer, rs *netstorage.Result)

func StreamLabelValuesResponse

func StreamLabelValuesResponse(qw422016 *qt422016.Writer, isPartial bool, labelValues []string, qt *querytracer.Tracer)

func StreamLabelsResponse

func StreamLabelsResponse(qw422016 *qt422016.Writer, isPartial bool, labels []string, qt *querytracer.Tracer)

func StreamQueryRangeResponse

func StreamQueryRangeResponse(qw422016 *qt422016.Writer, isPartial bool, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func())

func StreamQueryResponse

func StreamQueryResponse(qw422016 *qt422016.Writer, isPartial bool, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func())

func StreamSeriesCountResponse

func StreamSeriesCountResponse(qw422016 *qt422016.Writer, isPartial bool, n uint64)

func StreamSeriesResponse

func StreamSeriesResponse(qw422016 *qt422016.Writer, isPartial bool, metricNames []string, qt *querytracer.Tracer, qtDone func())

func StreamTSDBStatusResponse added in v1.35.0

func StreamTSDBStatusResponse(qw422016 *qt422016.Writer, isPartial bool, status *storage.TSDBStatus, qt *querytracer.Tracer)

func TSDBStatusHandler added in v1.35.0

func TSDBStatusHandler(qt *querytracer.Tracer, startTime time.Time, at *auth.Token, 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(isPartial bool, status *storage.TSDBStatus, qt *querytracer.Tracer) string

func WriteErrorResponse

func WriteErrorResponse(qq422016 qtio422016.Writer, statusCode int, err error)

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 WriteExportPromAPILine

func WriteExportPromAPILine(qq422016 qtio422016.Writer, xb *exportBlock)

func WriteExportPromAPIResponse

func WriteExportPromAPIResponse(qq422016 qtio422016.Writer, resultsCh <-chan *quicktemplate.ByteBuffer, qt *querytracer.Tracer)

func WriteExportPrometheusLine

func WriteExportPrometheusLine(qq422016 qtio422016.Writer, xb *exportBlock)

func WriteExportStdResponse

func WriteExportStdResponse(qq422016 qtio422016.Writer, resultsCh <-chan *quicktemplate.ByteBuffer, qt *querytracer.Tracer)

func WriteFederate

func WriteFederate(qq422016 qtio422016.Writer, rs *netstorage.Result)

func WriteLabelValuesResponse

func WriteLabelValuesResponse(qq422016 qtio422016.Writer, isPartial bool, labelValues []string, qt *querytracer.Tracer)

func WriteLabelsResponse

func WriteLabelsResponse(qq422016 qtio422016.Writer, isPartial bool, labels []string, qt *querytracer.Tracer)

func WriteQueryRangeResponse

func WriteQueryRangeResponse(qq422016 qtio422016.Writer, isPartial bool, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func())

func WriteQueryResponse

func WriteQueryResponse(qq422016 qtio422016.Writer, isPartial bool, rs []netstorage.Result, qt *querytracer.Tracer, qtDone func())

func WriteSeriesCountResponse

func WriteSeriesCountResponse(qq422016 qtio422016.Writer, isPartial bool, n uint64)

func WriteSeriesResponse

func WriteSeriesResponse(qq422016 qtio422016.Writer, isPartial bool, metricNames []string, qt *querytracer.Tracer, qtDone func())

func WriteTSDBStatusResponse added in v1.35.0

func WriteTSDBStatusResponse(qq422016 qtio422016.Writer, isPartial bool, status *storage.TSDBStatus, qt *querytracer.Tracer)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL