grafana_dashboard

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HEIGHT = 10
View Source
var WIDTH = 24

Functions

func DashboardFilename

func DashboardFilename(documentBytes []byte, productName string) string

func ToGrafanaDashboard added in v0.10.0

func ToGrafanaDashboard(document v1.IndicatorDocument, indicatorType v1.IndicatorType) (*sdk.Board, error)

func ToGrafanaDescription added in v0.10.0

func ToGrafanaDescription(docs map[string]string) *string

func ToGrafanaPanel added in v0.10.0

func ToGrafanaPanel(spec v1.IndicatorSpec) *sdk.Panel

func ToGrafanaThresholds added in v0.10.0

func ToGrafanaThresholds(thresholds []v1.Threshold) []sdk.Threshold

Types

type GrafanaAnnotation added in v0.7.8

type GrafanaAnnotation struct {
	Enable      bool   `json:"enable"`
	Expr        string `json:"expr"`
	TagKeys     string `json:"tagKeys"`
	TitleFormat string `json:"titleFormat"`
	IconColor   string `json:"iconColor"`
}

type GrafanaAnnotations added in v0.7.8

type GrafanaAnnotations struct {
	List []GrafanaAnnotation `json:"list"`
}

type GrafanaDashboard

type GrafanaDashboard struct {
	Title       string             `json:"title"`
	Rows        []GrafanaRow       `json:"rows"`
	Annotations GrafanaAnnotations `json:"annotations"`
}

GrafanaDashboards represent the layout of a dashboard in grafana. When `json.Marshall`ed, Grafana can load them from disk to populate its visualizations.

type GrafanaPanel

type GrafanaPanel struct {
	Title       string             `json:"title"`
	Type        string             `json:"type"`
	Description string             `json:"description,omitempty"`
	Targets     []GrafanaTarget    `json:"targets"`
	Thresholds  []GrafanaThreshold `json:"thresholds"`
}

type GrafanaRow

type GrafanaRow struct {
	Title  string         `json:"title"`
	Panels []GrafanaPanel `json:"panels"`
}

type GrafanaTarget

type GrafanaTarget struct {
	Expression string `json:"expr"`
}

type GrafanaThreshold

type GrafanaThreshold struct {
	Value     float64 `json:"value"`
	ColorMode string  `json:"colorMode"`
	Op        string  `json:"op"`
	Fill      bool    `json:"fill"`
	Line      bool    `json:"line"`
	Yaxis     string  `json:"yaxis"`
}

Jump to

Keyboard shortcuts

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