alert

package
v0.0.0-...-d050cfb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Desc           string `msg:"desc"`
	Duration       int32  `msg:"d"`   // 总耗时
	AccessCount    int    `msg:"ac"`  // 访问总数
	AccessErrCount int    `msg:"aec"` // 访问错误数
}

API API信息

type APIs

type APIs struct {
	APIS map[string]*API `msg:"apis"`
}

APIs ..

func NewAPIs

func NewAPIs() *APIs

NewAPIs ...

type Alert

type Alert struct {
	Channel    string   `json:"-"`          // 通知工具 email/mobile
	Type       string   `json:"Type"`       // 告警类型 告警/告警恢复
	Detail     string   `json:"Detail"`     // 告警概述 appName/告警类型/数据+单位
	ID         string   `json:"Id"`         // 告警ID
	Addrs      []string `json:"-"`          // 手机号码或者邮箱地址
	DetailAddr string   `json:"DetailAddr"` // 详情地址 http://apmtest.tf56.lo/ui/alerts/history?id=1558578065702692000
	Time       string   `json:"Timestamp"`
}

Alert 告警具体详情

func NewAlert

func NewAlert() *Alert

NewAlert ...

type Data

type Data struct {
	Type    int    `msg:"type"`
	AppName string `msg:"name"`
	AgentID string `msg:"id"`
	Time    int64  `msg:"time"`
	Payload []byte `msg:"payload"`
}

Data 告警存储数据

func NewData

func NewData() *Data

NewData ...

type Exception

type Exception struct {
	Count    int `msg:"c"`
	ErrCount int `msg:"ec"`
}

Exception 异常计数

func NewException

func NewException() *Exception

NewException ...

type Runtime

type Runtime struct {
	JVMCpuload    float64 `msg:"jc"` // jvm cpuload
	SystemCpuload float64 `msg:"sc"` // system cpuload
	JVMHeap       int64   `msg:"jh"` // jvm heap
	Count         int     `msg:"c"`  // 计数包的个数
}

Runtime ...

func NewRuntime

func NewRuntime() *Runtime

NewRuntime ...

type Runtimes

type Runtimes struct {
	Runtimes map[string]*Runtime `msg:"rs"` // agentid为key
}

Runtimes ...

func NewRuntimes

func NewRuntimes() *Runtimes

NewRuntimes ...

type SQL

type SQL struct {
	ID       int32 `msg:"desc"`
	Count    int   `msg:"count"`
	Errcount int   `msg:"errcount"`
	Duration int32 `msg:"duration"`
}

SQL sql计算

func NewSQL

func NewSQL() *SQL

NewSQL ...

type SQLs

type SQLs struct {
	SQLs map[int32]*SQL `msg:"sqls"`
}

SQLs sqls

func NewSQLs

func NewSQLs() *SQLs

NewSQLs ...

type User

type User struct {
	Mobile string
	Email  string
}

User ....

func NewUser

func NewUser() *User

NewUser ...

Jump to

Keyboard shortcuts

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