Documentation ¶
Index ¶
- func AdjustStep(start, stop, maxPointsPerQuery, minStep int64) int64
- func AlignValues(startTime, stopTime, step int64, promValues []types.Value) []float64
- func ConvertGraphiteTargetToPromQL(query string) string
- func PromMetricToGraphite(metric map[string]string) string
- func PromethizeTagValue(tagValue string) (string, types.Tag)
- func SeriesByTagToPromQL(step, target string) (string, string)
- func SplitTagValues(query string) map[string]types.Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustStep ¶
AdjustStep adjusts step keeping in mind default/configurable limit of maximum points per query Steps sequence is aligned with Grafana. Step progresses in the following order: minimal configured step if not default => 20 => 30 => 60 => 120 => 300 => 600 => 900 => 1200 => 1800 => 3600 => 7200 => 10800 => 21600 => 43200 => 86400
func AlignValues ¶
AlignValues inserts math.NaN() in place of gaps in data from Prometheus
func ConvertGraphiteTargetToPromQL ¶
ConvertGraphiteTargetToPromQL - converts graphite target string to PromQL friendly format
func PromMetricToGraphite ¶
PromMetricToGraphite converts prometheus metric name to a format expected by graphite
func PromethizeTagValue ¶
PromethizeTagValue - accept 'Tag=value' or 'Tag=~value' string and return sanitized version of it
func SeriesByTagToPromQL ¶
SeriesByTagToPromQL converts graphite SeriesByTag to PromQL will return step if __step__ is passed
Types ¶
This section is empty.