Documentation
¶
Index ¶
- Constants
- type ExecErrState
- type GrafanaAlertClient
- func (c *GrafanaAlertClient) CreateGrafanaAlertRule(payload GrafanaAlertRule) (*GrafanaAlertRule, error)
- func (c *GrafanaAlertClient) DeleteGrafanaAlertRule(uid string) error
- func (c *GrafanaAlertClient) GetGrafanaAlertRule(uid string) (*GrafanaAlertRule, error)
- func (c *GrafanaAlertClient) ListGrafanaAlertRules() ([]GrafanaAlertRule, error)
- func (c *GrafanaAlertClient) UpdateGrafanaAlertRule(payload GrafanaAlertRule) error
- type GrafanaAlertQuery
- type GrafanaAlertRule
- type NoDataState
- type RelativeTimeRangeObj
Constants ¶
View Source
const ( ErrOK ExecErrState = "OK" ErrError ExecErrState = "Error" ErrAlerting ExecErrState = "Alerting" NoDataOk NoDataState = "OK" NoData NoDataState = "NoData" NoDataAlerting NoDataState = "Alerting" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecErrState ¶
type ExecErrState string
type GrafanaAlertClient ¶
func (*GrafanaAlertClient) CreateGrafanaAlertRule ¶
func (c *GrafanaAlertClient) CreateGrafanaAlertRule(payload GrafanaAlertRule) (*GrafanaAlertRule, error)
func (*GrafanaAlertClient) DeleteGrafanaAlertRule ¶
func (c *GrafanaAlertClient) DeleteGrafanaAlertRule(uid string) error
func (*GrafanaAlertClient) GetGrafanaAlertRule ¶
func (c *GrafanaAlertClient) GetGrafanaAlertRule(uid string) (*GrafanaAlertRule, error)
func (*GrafanaAlertClient) ListGrafanaAlertRules ¶
func (c *GrafanaAlertClient) ListGrafanaAlertRules() ([]GrafanaAlertRule, error)
func (*GrafanaAlertClient) UpdateGrafanaAlertRule ¶
func (c *GrafanaAlertClient) UpdateGrafanaAlertRule(payload GrafanaAlertRule) error
type GrafanaAlertQuery ¶
type GrafanaAlertQuery struct { DatasourceUid string `json:"datasourceUid"` Model interface{} `json:"model"` QueryType string `json:"queryType"` RefId string `json:"refId"` RelativeTimeRange RelativeTimeRangeObj `json:"relativeTimeRange"` }
type GrafanaAlertRule ¶
type GrafanaAlertRule struct { Annotations map[string]string `json:"annotations,omitempty"` Condition string `json:"condition"` // Required Data []*GrafanaAlertQuery `json:"data"` // Required ExecErrState ExecErrState `json:"execErrState"` // Required FolderUID string `json:"folderUID"` // Required For int64 `json:"for"` // Required, representing nanoseconds Id int64 `json:"id,omitempty"` Labels map[string]string `json:"labels,omitempty"` NoDataState NoDataState `json:"noDataState"` // Required OrgID int64 `json:"orgID"` // Required Provenance string `json:"provenance,omitempty"` RuleGroup string `json:"ruleGroup"` // Required Title string `json:"title"` // Required Uid string `json:"uid,omitempty"` Updated time.Time `json:"updated"` IsPaused bool `json:"isPaused"` }
type NoDataState ¶
type NoDataState string
Click to show internal directories.
Click to hide internal directories.