alertmanager

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertAnnotation

type AlertAnnotation struct {
	Message string `json:"message"`
	Comment string `json:"comment,omitempty"`
}

AlertAnnotation annotations

type AlertManageInterface

type AlertManageInterface interface {
	CreateAlertInfoToAlertManager(req *CreateBusinessAlertInfoReq, timeout time.Duration) error
}

AlertManageInterface for alertmanager interface

func NewAlertManager

func NewAlertManager(opt Options) (AlertManageInterface, error)

NewAlertManager init alertmanager server

type CommonAlertLabel

type CommonAlertLabel struct {
	AlarmType string `json:"alarmType"` // resource/module
	ClusterID string `json:"clusterID"`
}

CommonAlertLabel for common label

type CreateBusinessAlertInfoReq

type CreateBusinessAlertInfoReq struct {
	Starttime          int64               `json:"starttime"`
	Endtime            int64               `json:"endtime"`
	Generatorurl       string              `json:"generatorurl"`
	AlarmType          string              `json:"alarmType"`
	ClusterID          string              `json:"clusterID"`
	AlertAnnotation    *AlertAnnotation    `json:"alertAnnotation"`
	ModuleAlertLabel   *ModuleAlertLabel   `json:"moduleAlertLabel,omitempty"`
	ResourceAlertLabel *ResourceAlertLabel `json:"resourceAlertLabel,omitempty"`
}

CreateBusinessAlertInfoReq for alertInfo req

type CreateBusinessAlertInfoResp

type CreateBusinessAlertInfoResp struct {
	ErrCode uint64 `json:"errCode"`
	ErrMsg  string `json:"errMsg"`
}

CreateBusinessAlertInfoResp http response

type ModuleAlertLabel

type ModuleAlertLabel struct {
	ModuleName string `json:"moduleName"`
	ModuleIP   string `json:"moduleIP"`
	AlarmName  string `json:"alarmName"`
	AlarmLevel string `json:"alarmLevel"`
}

ModuleAlertLabel module labels

type Options

type Options struct {
	Server     string
	Token      string
	ClientAuth bool
	Debug      bool
}

Options for alert-manager server conf

type ResourceAlertLabel

type ResourceAlertLabel struct {
	AlarmName         string `json:"alarmName"`
	NameSpace         string `json:"nameSpace"`
	AlarmResourceType string `json:"alarmResourceType"`
	AlarmResourceName string `json:"alarmResourceName"`
	AlarmID           string `json:"alarmID"`
	AlarmLevel        string `json:"alarmLevel"`
}

ResourceAlertLabel resource labels

Jump to

Keyboard shortcuts

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