dynatrace

package
v0.49.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSloFromQueryMetrics

func ComputeSloFromQueryMetrics(points []float64, agg string) (slo float64, err error)

Types

type AddHeaderTransport

type AddHeaderTransport struct {
	T http.RoundTripper
}

func NewAddHeaderTransport

func NewAddHeaderTransport(T http.RoundTripper) *AddHeaderTransport

func (*AddHeaderTransport) RoundTrip

func (adt *AddHeaderTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Dynatrace

type Dynatrace struct {
	*http.Client
}

func New

func New() (*Dynatrace, error)

func (*Dynatrace) CanHandleSelector

func (dt *Dynatrace) CanHandleSelector(labels entities.Selector) bool

CanHandleSelector returns true only if both datadog queries are defined

func (*Dynatrace) ComputeObjective

func (dt *Dynatrace) ComputeObjective(o *entities.Objective, from, to time.Time) (i *entities.Indicator, err error)

func (*Dynatrace) GetSLO

func (dt *Dynatrace) GetSLO(id string) (*SLO, error)

func (*Dynatrace) ListSLOs

func (dt *Dynatrace) ListSLOs() (slos []SLO, err error)

func (*Dynatrace) MetricQuery

func (dt *Dynatrace) MetricQuery(selector entities.Selector, from, to time.Time) (*MetricResult, error)

type ErrorBudgetBurnRate

type ErrorBudgetBurnRate struct {
	BurnRateVisualizationEnabled bool    `json:"burnRateVisualizationEnabled"`
	FastBurnThreshold            float64 `json:"fastBurnThreshold"`
	BurnRateValue                float64 `json:"burnRateValue"`
	BurnRateType                 string  `json:"burnRateType"`
	SloValue                     int     `json:"sloValue"`
}

type GetSLOResponseBody

type GetSLOResponseBody struct {
	Slo         []SLO  `json:"slo"`
	NextPageKey string `json:"nextPageKey"`
	PageSize    int    `json:"pageSize"`
	TotalCount  int    `json:"totalCount"`
}

type MetricQueryResponse

type MetricQueryResponse struct {
	TotalCount  int            `json:"totalCount"`
	NextPageKey string         `json:"nextPageKey"`
	Resolution  string         `json:"resolution"`
	Result      []MetricResult `json:"result"`
}

type MetricResult

type MetricResult struct {
	MetricID string   `json:"metricId"`
	Data     []Points `json:"data"`
}

type Points

type Points struct {
	Timestamps []int64   `json:"timestamps"`
	Values     []float64 `json:"values"`
}

type SLO

type SLO struct {
	MetricExpression     string  `json:"metricExpression"`
	UseRateMetric        bool    `json:"useRateMetric"`
	MetricRate           string  `json:"metricRate"`
	MetricNumerator      string  `json:"metricNumerator"`
	MetricDenominator    string  `json:"metricDenominator"`
	EvaluationType       string  `json:"evaluationType"`
	EvaluatedPercentage  float64 `json:"evaluatedPercentage"`
	ErrorBudget          float64 `json:"errorBudget"`
	BurnRateMetricKey    string  `json:"burnRateMetricKey"`
	NumeratorValue       float64 `json:"numeratorValue"`
	DenominatorValue     float64 `json:"denominatorValue"`
	ProblemFilter        string  `json:"problemFilter"`
	RelatedOpenProblems  int     `json:"relatedOpenProblems"`
	RelatedTotalProblems int     `json:"relatedTotalProblems"`
	HasAccess            bool    `json:"hasAccess"`
	MetricKey            string  `json:"metricKey"`
	Timeframe            string  `json:"timeframe"`
	Filter               string  `json:"filter"`
	Name                 string  `json:"name"`
	ID                   string  `json:"id"`
	Target               float64 `json:"target"`
	Description          string  `json:"description"`
	Enabled              bool    `json:"enabled"`
	Status               string  `json:"status"`
	Warning              float64 `json:"warning"`
	Error                string  `json:"error"`
	ErrorBudgetBurnRate  `json:"errorBudgetBurnRate"`
}

Jump to

Keyboard shortcuts

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