Documentation
¶
Index ¶
- type LogzioGrafanaAlertsClient
- func (l *LogzioGrafanaAlertsClient) DeleteContactPoints(contactPointsToDelete []grafanacontactpoints.GrafanaContactPoint)
- func (l *LogzioGrafanaAlertsClient) DeleteRules(rulesToDelete []grafanaalerts.GrafanaAlertRule)
- func (l *LogzioGrafanaAlertsClient) FindOrCreatePrometheusAlertsFolder() (string, error)
- func (l *LogzioGrafanaAlertsClient) GetLogzioGrafanaAlerts(folderUid string) ([]grafanaalerts.GrafanaAlertRule, error)
- func (l *LogzioGrafanaAlertsClient) GetLogzioGrafanaNotificationPolicies() (grafananotificationpolicies.GrafanaNotificationPolicyTree, error)
- func (l *LogzioGrafanaAlertsClient) GetLogzioManagedGrafanaContactPoints() ([]grafanacontactpoints.GrafanaContactPoint, error)
- func (l *LogzioGrafanaAlertsClient) ResetNotificationPolicyTree() error
- func (l *LogzioGrafanaAlertsClient) SetNotificationPolicyTreeFromRouteTree(routeTree *alertmanagerconfig.Route)
- func (l *LogzioGrafanaAlertsClient) UpdateContactPoints(contactPointsToUpdate []alertmanagerconfig.Receiver, ...)
- func (l *LogzioGrafanaAlertsClient) UpdateRules(rulesToUpdate []rulefmt.RuleNode, ...)
- func (l *LogzioGrafanaAlertsClient) WriteContactPoints(contactPointsToWrite []alertmanagerconfig.Receiver)
- func (l *LogzioGrafanaAlertsClient) WriteRules(rulesToWrite []rulefmt.RuleNode, folderUid string)
- type PrometheusQueryModel
- type ReduceQueryModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogzioGrafanaAlertsClient ¶
type LogzioGrafanaAlertsClient struct { AlertManagerGlobalConfig *alertmanagerconfig.GlobalConfig // contains filtered or unexported fields }
func (*LogzioGrafanaAlertsClient) DeleteContactPoints ¶
func (l *LogzioGrafanaAlertsClient) DeleteContactPoints(contactPointsToDelete []grafanacontactpoints.GrafanaContactPoint)
DeleteContactPoints deletes the contact points from logz.io
func (*LogzioGrafanaAlertsClient) DeleteRules ¶
func (l *LogzioGrafanaAlertsClient) DeleteRules(rulesToDelete []grafanaalerts.GrafanaAlertRule)
DeleteRules deletes the rules from logz.io
func (*LogzioGrafanaAlertsClient) FindOrCreatePrometheusAlertsFolder ¶
func (l *LogzioGrafanaAlertsClient) FindOrCreatePrometheusAlertsFolder() (string, error)
FindOrCreatePrometheusAlertsFolder tries to find the prometheus alerts folder in logz.io, if it does not exist it creates it.
func (*LogzioGrafanaAlertsClient) GetLogzioGrafanaAlerts ¶
func (l *LogzioGrafanaAlertsClient) GetLogzioGrafanaAlerts(folderUid string) ([]grafanaalerts.GrafanaAlertRule, error)
GetLogzioGrafanaAlerts builds a list of rules from all logz.io
func (*LogzioGrafanaAlertsClient) GetLogzioGrafanaNotificationPolicies ¶
func (l *LogzioGrafanaAlertsClient) GetLogzioGrafanaNotificationPolicies() (grafananotificationpolicies.GrafanaNotificationPolicyTree, error)
func (*LogzioGrafanaAlertsClient) GetLogzioManagedGrafanaContactPoints ¶
func (l *LogzioGrafanaAlertsClient) GetLogzioManagedGrafanaContactPoints() ([]grafanacontactpoints.GrafanaContactPoint, error)
func (*LogzioGrafanaAlertsClient) ResetNotificationPolicyTree ¶
func (l *LogzioGrafanaAlertsClient) ResetNotificationPolicyTree() error
func (*LogzioGrafanaAlertsClient) SetNotificationPolicyTreeFromRouteTree ¶
func (l *LogzioGrafanaAlertsClient) SetNotificationPolicyTreeFromRouteTree(routeTree *alertmanagerconfig.Route)
SetNotificationPolicyTreeFromRouteTree converts route tree to grafana notification policy tree and writes it to logz.io
func (*LogzioGrafanaAlertsClient) UpdateContactPoints ¶
func (l *LogzioGrafanaAlertsClient) UpdateContactPoints(contactPointsToUpdate []alertmanagerconfig.Receiver, contactPointsMap []grafanacontactpoints.GrafanaContactPoint)
UpdateContactPoints updates the contact points in logz.io
func (*LogzioGrafanaAlertsClient) UpdateRules ¶
func (l *LogzioGrafanaAlertsClient) UpdateRules(rulesToUpdate []rulefmt.RuleNode, logzioRulesMap map[string]grafanaalerts.GrafanaAlertRule, folderUid string)
UpdateRules updates the rules in logz.io
func (*LogzioGrafanaAlertsClient) WriteContactPoints ¶
func (l *LogzioGrafanaAlertsClient) WriteContactPoints(contactPointsToWrite []alertmanagerconfig.Receiver)
WriteContactPoints writes the contact points to logz.io
func (*LogzioGrafanaAlertsClient) WriteRules ¶
func (l *LogzioGrafanaAlertsClient) WriteRules(rulesToWrite []rulefmt.RuleNode, folderUid string)
WriteRules writes the rules to logz.io
type PrometheusQueryModel ¶
type PrometheusQueryModel struct { Expr string `json:"expr"` Hide bool `json:"hide"` RefId string `json:"refId"` }
PrometheusQueryModel represents a Prometheus query.
func (PrometheusQueryModel) ToJSON ¶
func (p PrometheusQueryModel) ToJSON() (json.RawMessage, error)
ToJSON marshals the Query into a JSON byte slice
type ReduceQueryModel ¶
type ReduceQueryModel struct { DataSource map[string]string `json:"datasource"` Expression string `json:"expression"` Hide bool `json:"hide"` RefId string `json:"refId"` Reducer string `json:"reducer"` Type string `json:"type"` }
ReduceQueryModel represents a reduce query for time series data
func (ReduceQueryModel) ToJSON ¶
func (r ReduceQueryModel) ToJSON() (json.RawMessage, error)
ToJSON marshals the Query model into a JSON byte slice