Documentation ¶
Index ¶
- Constants
- func ExecInAlertManagerPod(kubeconfig *rest.Config, clientset *kubernetes.Clientset, cmd []string) (string, error)
- func ExecWithPod(kubeconfig *rest.Config, clientset *kubernetes.Clientset, podName string, ...) (string, error)
- type Alert
- type AlertAnnotations
- type AlertLabels
- type AlertStatus
- type Silence
- type SilenceID
- type SilenceMatchers
- type SilenceStatus
Constants ¶
View Source
const ( AccountNamespace = "openshift-monitoring" ContainerName = "alertmanager" LocalHostUrl = "http://localhost:9093" PrimaryPod = "alertmanager-main-0" SecondaryPod = "alertmanager-main-1" )
Variables ¶
This section is empty.
Functions ¶
func ExecInAlertManagerPod ¶
func ExecInAlertManagerPod(kubeconfig *rest.Config, clientset *kubernetes.Clientset, cmd []string) (string, error)
ExecInAlertManagerPod attempts to execute the given command in the primary Alertmanager pod, and if that fails, it retries with the secondary Alertmanager pod.
Types ¶
type Alert ¶
type Alert struct { Labels AlertLabels `json:"labels"` Status AlertStatus `json:"status"` Annotations AlertAnnotations `json:"annotations"` }
Alert represents a set of above declared struct Labels,Status and annoataions
type AlertAnnotations ¶
type AlertAnnotations struct {
Summary string `json:"summary"`
}
Annotations represents a set of summary/description associated with an alert.
type AlertLabels ¶
Labels represents a set of labels associated with an alert.
type AlertStatus ¶
type AlertStatus struct {
State string `json:"state"`
}
Status represents a set of state associated with an alert.
type Silence ¶
type Silence struct { ID string `json:"id"` Matchers []SilenceMatchers `json:"matchers"` Status SilenceStatus `json:"status"` Comment string `json:"comment"` CreatedBy string `json:"createdBy"` EndsAt string `json:"endsAt"` StartsAt string `json:"startsAt"` }
type SilenceMatchers ¶
type SilenceStatus ¶
type SilenceStatus struct {
State string `json:"state"`
}
Click to show internal directories.
Click to hide internal directories.