utils

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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.

func ExecWithPod

func ExecWithPod(kubeconfig *rest.Config, clientset *kubernetes.Clientset, podName string, AccountNamespace string, cmd []string) (string, error)

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

type AlertLabels struct {
	Alertname string `json:"alertname"`
	Severity  string `json:"severity"`
}

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 SilenceID

type SilenceID struct {
	ID string `json:"id"`
}

type SilenceMatchers

type SilenceMatchers struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type SilenceStatus

type SilenceStatus struct {
	State string `json:"state"`
}

Jump to

Keyboard shortcuts

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