silence

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountNamespace = "openshift-monitoring"
	ContainerName    = "alertmanager"
	LocalHostUrl     = "http://localhost:9093"
	PodName          = "alertmanager-main-0"
)

Variables

This section is empty.

Functions

func AddAlertNameSilence

func AddAlertNameSilence(alertID []string, duration, comment, username string, kubeconfig *rest.Config, clientset *kubernetes.Clientset)

func AddAllSilence

func AddAllSilence(clusterID, duration, comment, username, clustername string, kubeconfig *rest.Config, clientset *kubernetes.Clientset)

func AddSilence

func AddSilence(cmd *addSilenceCmd)

func ClearAllSilence

func ClearAllSilence(kubeconfig *rest.Config, clientset *kubernetes.Clientset)

func ClearSilence

func ClearSilence(cmd *silenceCmd)

func ClearSilenceByID

func ClearSilenceByID(silenceIDs []string, kubeconfig *rest.Config, clientset *kubernetes.Clientset)

func ExecInPod

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

func GetUserAndClusterInfo

func GetUserAndClusterInfo(clusterid string) (string, string)

Get User name and clustername

func ListSilence

func ListSilence(clusterID string)

func NewCmdAddSilence

func NewCmdAddSilence() *cobra.Command

func NewCmdClearSilence

func NewCmdClearSilence() *cobra.Command

func NewCmdListSilence

func NewCmdListSilence() *cobra.Command

func NewCmdSilence

func NewCmdSilence() *cobra.Command

NewCmdSilence implements base silence command.

Types

type ID

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

type Matchers

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

type Silence

type Silence struct {
	ID       string     `json:"id"`
	Matchers []Matchers `json:"matchers"`

	Status    Status `json:"status"`
	Comment   string `json:"comment"`
	CreatedBy string `json:"createdBy"`
	EndsAt    string `json:"endsAt"`
	StartsAt  string `json:"startsAt"`
}

type Status

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

Jump to

Keyboard shortcuts

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