target

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchData

func FetchData(database moira.Database, pattern string, from int64, until int64, allowRealTimeAlerting bool) ([]*types.MetricData, []string, error)

FetchData gets values of given pattern metrics from given interval and returns values and all found pattern metrics

Types

type ErrEvalExpr

type ErrEvalExpr struct {
	// contains filtered or unexported fields
}

ErrEvalExpr used when carbonapi.EvalExpr returns error

func (ErrEvalExpr) Error

func (err ErrEvalExpr) Error() string

Error is implementation of golang error interface for ErrEvalExpr struct

type ErrEvaluateTargetFailedWithPanic

type ErrEvaluateTargetFailedWithPanic struct {
	// contains filtered or unexported fields
}

ErrEvaluateTargetFailedWithPanic used to identify occurred error as a result of recover from panic

func (ErrEvaluateTargetFailedWithPanic) Error

Error is implementation of golang error interface for ErrEvaluateTargetFailedWithPanic struct

type ErrParseExpr

type ErrParseExpr struct {
	// contains filtered or unexported fields
}

ErrParseExpr used when carbonapi.ParseExpr returns error

func (ErrParseExpr) Error

func (err ErrParseExpr) Error() string

Error is implementation of golang error interface for ErrParseExpr struct

type ErrUnknownFunction

type ErrUnknownFunction struct {
	FuncName string
	// contains filtered or unexported fields
}

ErrUnknownFunction used when carbonapi.ParseExpr returns unknown function error

func ErrorUnknownFunction

func ErrorUnknownFunction(err error) ErrUnknownFunction

ErrorUnknownFunction parses internal carbonapi error errUnknownFunction, gets func name and return ErrUnknownFunction error

func (ErrUnknownFunction) Error

func (err ErrUnknownFunction) Error() string

Error is implementation of golang error interface for ErrUnknownFunction struct

type EvaluationResult

type EvaluationResult struct {
	TimeSeries []*TimeSeries
	Patterns   []string
	Metrics    []string
}

EvaluationResult represents evaluation target result and contains TimeSeries list, Pattern list and metric lists appropriate to given target

func EvaluateTarget

func EvaluateTarget(database moira.Database, target string, from int64, until int64, allowRealTimeAlerting bool) (*EvaluationResult, error)

EvaluateTarget is analogue of evaluateTarget method in graphite-web, that gets target metrics value from DB and Evaluate it using carbon-api eval package

type TimeSeries

type TimeSeries struct {
	types.MetricData
	Wildcard bool
}

TimeSeries is abstraction over carbon-api types.MetricData type

func (*TimeSeries) GetTimestampValue

func (timeSeries *TimeSeries) GetTimestampValue(valueTimestamp int64) float64

GetTimestampValue gets value of given timestamp index, if value is Nil, then return NaN

Jump to

Keyboard shortcuts

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