service

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, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAnalyze

type APIAnalyze struct {
	// contains filtered or unexported fields
}

APIAnalyze api 分析

type Alert

type Alert struct {
	// contains filtered or unexported fields
}

Alert 告警服务

func New

func New(l *zap.Logger) *Alert

New new alert

func (*Alert) Close

func (a *Alert) Close() error

Close stop server

func (*Alert) GetStaticCql

func (a *Alert) GetStaticCql() *gocql.Session

func (*Alert) GettraceCql

func (a *Alert) GettraceCql() *gocql.Session

GetCql ...

func (*Alert) Start

func (a *Alert) Start() error

Start start server

type AlertInfo

type AlertInfo struct {
	Type     int      // 监控项类型
	Compare  int      // 比较类型 1: > 2:<  3:=
	Duration int      // 持续时间, 1 代表1分钟
	Keys     []string // code...
	Value    float64  // 阀值
	Unit     string   //单位
}

AlertInfo 策略信息

type App

type App struct {
	SpecialAlert *SpecialAlert      // 特殊监控
	Alerts       map[int]*AlertInfo // 策略模版,通用策略
	// contains filtered or unexported fields
}

App app

func (*App) APICache

func (a *App) APICache(apis *alert.APIs, dataTime int64)

APICache api计算分析

func (*App) EXCache

func (a *App) EXCache(exception *alert.Exception, dataTime int64)

EXCache ...

func (*App) RuntimeCache

func (a *App) RuntimeCache(runtimes *alert.Runtimes, dataTime int64)

RuntimeCache runtime数据计算

func (*App) SQLCache

func (a *App) SQLCache(sqls *alert.SQLs, dataTime int64)

SQLCache sql计算分析

type Apps

type Apps struct {
	sync.RWMutex
	Apps          map[string]*App
	Cache         map[string]struct{} // app 缓存
	DefaultAlerts []*AlertInfo        // 默认alerts
}

Apps apps

type CpuloadPolymerize

type CpuloadPolymerize struct {
	JVMCpuload    float64 `msg:"jc"` // jvm cpuload
	SystemCpuload float64 `msg:"sc"` // system cpuload
	Value         float64 `msg:"value"`
	Count         int     // 计数器,多少个包
}

CpuloadPolymerize ...

type EXAnalyze

type EXAnalyze struct {
	// contains filtered or unexported fields
}

EXAnalyze 异常分析

type JVMHeapPolymerize

type JVMHeapPolymerize struct {
	JVMHeap int64   `msg:"jh"` // jvm heap
	Value   float64 `msg:"value"`
	Count   int     // 计数器,多少个包
}

JVMHeapPolymerize ...

type Orderly

type Orderly []int64

Orderly 排序工具

func (Orderly) Len

func (o Orderly) Len() int

Len OrderlyKey 长度

func (Orderly) Less

func (o Orderly) Less(i, j int) bool

Less 对比

func (Orderly) Swap

func (o Orderly) Swap(i, j int)

Swap 交换

type Policy

type Policy struct {
	AppName    string   // app名
	Owner      string   // owner
	ID         string   // policyid
	Group      string   // 组
	Channel    string   // 告警方式
	Users      []string // 用户
	UpdateDate int64    // 更新时间
	// contains filtered or unexported fields
}

Policy 策略

type Polymerize

type Polymerize struct {
	Count    int     `msg:"count"`
	ErrCount int     `msg:"errcount"`
	Duration int32   `msg:"duration"`
	Value    float64 `msg:"value"`
}

Polymerize 监控聚合数据

type Polymerizes

type Polymerizes struct {
	Polymerizes map[int]map[int64]*Polymerize // key为alertType, value为该指标时间戳集合的打点数据
}

Polymerizes ...

type RuntimeAnalyze

type RuntimeAnalyze struct {
	// contains filtered or unexported fields
}

RuntimeAnalyze runtime分析

type SQLAnalyze

type SQLAnalyze struct {
	// contains filtered or unexported fields
}

SQLAnalyze sql分析

type SpecialAlert

type SpecialAlert struct {
	API map[string]map[int]*AlertInfo
}

SpecialAlert 特殊监控类型

Jump to

Keyboard shortcuts

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