package prometheus
import "github.com/influxdata/influxdb/prometheus"
Index ¶
- func ModelTagsToLabelPairs(tags models.Tags) []prompb.Label
- func PrometheusToStatistics(family []*dto.MetricFamily, tags map[string]string) []models.Statistic
- func ReadRequestToInfluxStorageRequest(req *prompb.ReadRequest, db, rp string) (*datatypes.ReadFilterRequest, error)
- func RemoveInfluxSystemTags(tags models.Tags) models.Tags
- func TagsToLabelPairs(tags map[string]string) []*prompb.Label
- func WriteRequestToPoints(req *prompb.WriteRequest) ([]models.Point, error)
- type DroppedValuesError
Functions ¶
func ModelTagsToLabelPairs ¶
ModelTagsToLabelPairs converts models.Tags to a slice of Prometheus label pairs
func PrometheusToStatistics ¶
PrometheusToStatistics converts a prometheus metric family (from Registry.Gather) to a []model.Statistics for /debug/vars . This code is strongly inspired by the telegraf prometheus plugin.
func ReadRequestToInfluxStorageRequest ¶
func ReadRequestToInfluxStorageRequest(req *prompb.ReadRequest, db, rp string) (*datatypes.ReadFilterRequest, error)
ReadRequestToInfluxStorageRequest converts a Prometheus remote read request into one using the new storage API that IFQL uses.
func RemoveInfluxSystemTags ¶
RemoveInfluxSystemTags will remove tags that are Influx internal (_measurement and _field)
func TagsToLabelPairs ¶
TagsToLabelPairs converts a map of Influx tags into a slice of Prometheus label pairs
func WriteRequestToPoints ¶
func WriteRequestToPoints(req *prompb.WriteRequest) ([]models.Point, error)
WriteRequestToPoints converts a Prometheus remote write request of time series and their samples into Points that can be written into Influx
Types ¶
type DroppedValuesError ¶
type DroppedValuesError struct {
// contains filtered or unexported fields
}
A DroppedValuesError is returned when the prometheus write request contains unsupported float64 values.
func (DroppedValuesError) Error ¶
func (e DroppedValuesError) Error() string
Error returns a descriptive error of the values dropped.
Source Files ¶
- Version
- v1.12.0 (latest)
- Published
- Apr 8, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 2 days ago –
Tools for package owners.