models

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerToken        = `default-token-used-in-server-side`
	DatetimeFormat     = `2006-01-02 15:04:05`
	DateFormatWithZone = `2006-01-02 15:04:05 MST`
	Version            = `1.0.0`
	SystemRole         = `SUB_SYSTEM`
	PlatformUser       = `SYS_PLATFORM`
)

Variables

View Source
var (
	ConfigFile string

	CoreUrl              string
	CoreJwtKey           string
	FiringCallback       string
	RecoverCallback      string
	SubSystemCode        string
	SubSystemKey         string
	DefaultMailReceiver  []string
	DefaultLocalTimeZone string
)
View Source
var (
	LogIgnorePath         = []string{"/monitor/webhook", "export/ping/source"}
	LogParamIgnorePath    = []string{"/dashboard/newchart", "/dashboard/pie/chart", "/problem/query", "/problem/history"}
	DashboardIgnoreTagKey = []string{"job", "__name__"}
)

Functions

func DecryptRsa added in v1.6.0

func DecryptRsa(inputString string) string

func GetCoreToken added in v1.9.0

func GetCoreToken() string

func InitConfig

func InitConfig(cfg string)

func InitCoreToken added in v1.9.0

func InitCoreToken()

func RSAEncryptByPrivate added in v1.9.0

func RSAEncryptByPrivate(orgidata []byte, privatekey string) ([]byte, error)

Types

type AMRespAlert

type AMRespAlert struct {
	Status       string            `json:"status"`
	Labels       map[string]string `json:"labels"`
	Annotations  map[string]string `json:"annotations"`
	StartsAt     time.Time         `json:"startsAt"`
	EndsAt       time.Time         `json:"endsAt"`
	GeneratorURL string            `json:"generatorURL"`
	Fingerprint  string            `json:"fingerprint"`
}

type AcceptObj

type AcceptObj struct {
	Employ []string `json:"employ"`
}

type AgentConfig added in v1.0.1

type AgentConfig struct {
	AgentType  string `json:"agent_type"`
	AgentBin   string `json:"agent_bin"`
	Port       string `json:"port"`
	User       string `json:"user"`
	Password   string `json:"password"`
	ConfigFile string `json:"config_file"`
}

type AgentManagerTable added in v1.5.0

type AgentManagerTable struct {
	EndpointGuid    string `json:"endpoint_guid"`
	Name            string `json:"name"`
	User            string `json:"user"`
	Password        string `json:"password"`
	InstanceAddress string `json:"instance_address"`
	AgentAddress    string `json:"agent_address"`
	ConfigFile      string `json:"config_file"`
	BinPath         string `json:"bin_path"`
}

type AlarmCustomTable added in v1.5.4

type AlarmCustomTable struct {
	Id           int       `json:"id"`
	AlertInfo    string    `json:"alert_info"`
	AlertIp      string    `json:"alert_ip"`
	AlertLevel   int       `json:"alert_level"`
	AlertObj     string    `json:"alert_obj"`
	AlertTitle   string    `json:"alert_title"`
	AlertReciver string    `json:"alert_reciver"`
	RemarkInfo   string    `json:"remark_info"`
	SubSystemId  string    `json:"sub_system_id"`
	Closed       int       `json:"closed"`
	UpdateAt     time.Time `json:"update_at"`
}

type AlarmEndpointObj

type AlarmEndpointObj struct {
	Id        string      `json:"id"`
	Guid      string      `json:"guid"`
	Type      string      `json:"type"`
	GroupsIds string      `json:"groups_ids"`
	Groups    []*GrpTable `json:"groups"`
}

type AlarmEndpointQuery

type AlarmEndpointQuery struct {
	Search    string
	Page      int
	Size      int
	Grp       int
	Result    []*AlarmEndpointObj
	ResultNum int
}

type AlarmEntity added in v1.3.0

type AlarmEntity struct {
	Status  string            `json:"status"`
	Message string            `json:"message"`
	Data    []*AlarmEntityObj `json:"data"`
}

type AlarmEntityObj added in v1.3.0

type AlarmEntityObj struct {
	Id      string `json:"id"`
	Status  string `json:"status"`
	Subject string `json:"subject"`
	Content string `json:"content"`
	To      string `json:"to"`
	ToMail  string `json:"toMail"`
	ToPhone string `json:"toPhone"`
	ToRole  string `json:"toRole"`
}

type AlarmHandleObj added in v1.9.0

type AlarmHandleObj struct {
	AlarmTable
	NotifyEnable int `json:"notify_enable"`
	NotifyDelay  int `json:"notify_delay"`
}

type AlarmHistoryReturnData added in v1.11.0

type AlarmHistoryReturnData struct {
	Endpoint    string           `json:"endpoint"`
	ProblemList AlarmProblemList `json:"problem_list"`
}

type AlarmProblemCountList added in v1.10.0

type AlarmProblemCountList []*AlarmProblemCountObj

func (AlarmProblemCountList) Len added in v1.10.0

func (s AlarmProblemCountList) Len() int

func (AlarmProblemCountList) Less added in v1.10.0

func (s AlarmProblemCountList) Less(i, j int) bool

func (AlarmProblemCountList) Swap added in v1.10.0

func (s AlarmProblemCountList) Swap(i, j int)

type AlarmProblemCountObj added in v1.10.0

type AlarmProblemCountObj struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Value      int    `json:"value"`
	FilterType string `json:"filterType"`
}

type AlarmProblemList added in v1.0.1

type AlarmProblemList []*AlarmProblemQuery

func (AlarmProblemList) Len added in v1.0.1

func (s AlarmProblemList) Len() int

func (AlarmProblemList) Less added in v1.0.1

func (s AlarmProblemList) Less(i, j int) bool

func (AlarmProblemList) Swap added in v1.0.1

func (s AlarmProblemList) Swap(i, j int)

type AlarmProblemQuery

type AlarmProblemQuery struct {
	Id           int       `json:"id"`
	StrategyId   int       `json:"strategy_id"`
	Endpoint     string    `json:"endpoint"`
	Status       string    `json:"status"`
	SMetric      string    `json:"s_metric"`
	SExpr        string    `json:"s_expr"`
	SCond        string    `json:"s_cond"`
	SLast        string    `json:"s_last"`
	SPriority    string    `json:"s_priority"`
	Content      string    `json:"content"`
	Tags         string    `json:"tags"`
	StartValue   float64   `json:"start_value"`
	Start        time.Time `json:"start"`
	StartString  string    `json:"start_string"`
	EndValue     float64   `json:"end_value"`
	End          time.Time `json:"end"`
	EndString    string    `json:"end_string"`
	IsLogMonitor bool      `json:"is_log_monitor"`
	Path         string    `json:"path"`
	Keyword      string    `json:"keyword"`
	IsCustom     bool      `json:"is_custom"`
}

type AlarmProblemQueryResult added in v1.6.0

type AlarmProblemQueryResult struct {
	Data  AlarmProblemList        `json:"data"`
	High  int                     `json:"high"`
	Mid   int                     `json:"mid"`
	Low   int                     `json:"low"`
	Count []*AlarmProblemCountObj `json:"count"`
}

type AlarmTable

type AlarmTable struct {
	Id         int       `json:"id"`
	StrategyId int       `json:"strategy_id"`
	Endpoint   string    `json:"endpoint"`
	Status     string    `json:"status"`
	SMetric    string    `json:"s_metric"`
	SExpr      string    `json:"s_expr"`
	SCond      string    `json:"s_cond"`
	SLast      string    `json:"s_last"`
	SPriority  string    `json:"s_priority"`
	Content    string    `json:"content"`
	Tags       string    `json:"tags"`
	StartValue float64   `json:"start_value"`
	Start      time.Time `json:"start"`
	EndValue   float64   `json:"end_value"`
	End        time.Time `json:"end"`
}

type AlertConfig added in v1.1.0

type AlertConfig struct {
	Enable bool            `json:"enable"`
	Mail   AlertMailConfig `json:"mail"`
}

type AlertMailConfig added in v1.1.0

type AlertMailConfig struct {
	Enable   bool   `json:"enable"`
	Protocol string `json:"protocol"`
	Tls      bool   `json:"tls"`
	Sender   string `json:"sender"`
	User     string `json:"user"`
	Password string `json:"password"`
	Server   string `json:"server"`
	Token    string `json:"token"`
}

type AlertWindowObj added in v1.8.0

type AlertWindowObj struct {
	Start    string   `json:"start"`
	End      string   `json:"end"`
	TimeList []string `json:"time_list"`
	Weekday  string   `json:"weekday"`
}

type AlertWindowParam added in v1.8.0

type AlertWindowParam struct {
	Endpoint string            `json:"endpoint" binding:"required"`
	Data     []*AlertWindowObj `json:"data"`
}

type AlertWindowTable added in v1.8.0

type AlertWindowTable struct {
	Id         int    `json:"id"`
	Endpoint   string `json:"endpoint"`
	Start      string `json:"start"`
	End        string `json:"end"`
	Weekday    string `json:"weekday"`
	UpdateUser string `json:"update_user"`
}

type AliveCheckQueueTable added in v1.5.2

type AliveCheckQueueTable struct {
	Id      int    `json:"id"`
	Message string `json:"message"`
}

type AlterManagerRespObj

type AlterManagerRespObj struct {
	Receiver          string            `json:"receiver"`
	Status            string            `json:"status"`
	Alerts            []AMRespAlert     `json:"alerts"`
	GroupLabels       map[string]string `json:"groupLabels"`
	CommonLabels      map[string]string `json:"commonLabels"`
	CommonAnnotations map[string]string `json:"commonAnnotations"`
	ExternalURL       string            `json:"externalURL"`
	Version           string            `json:"version"`
	GroupKey          string            `json:"groupKey"`
}

type ArchiveMysqlConfig added in v1.5.2

type ArchiveMysqlConfig struct {
	Enable             string `json:"enable"`
	Type               string `json:"type"`
	Server             string `json:"server"`
	Port               string `json:"port"`
	User               string `json:"user"`
	Password           string `json:"password"`
	DataBase           string `json:"database"`
	DatabasePrefix     string `json:"database_prefix"`
	MaxOpen            int    `json:"maxOpen"`
	MaxIdle            int    `json:"maxIdle"`
	Timeout            int    `json:"timeout"`
	LocalStorageMaxDay int64  `json:"local_storage_max_day"`
	FiveMinStartDay    int64  `json:"five_min_start_day"`
}

type ArchiveQueryTable added in v1.5.2

type ArchiveQueryTable struct {
	Endpoint string  `json:"endpoint"`
	Metric   string  `json:"metric"`
	Tags     string  `json:"tags"`
	UnixTime int64   `json:"unix_time"`
	Value    float64 `json:"value"`
}

type BusinessAgentDto added in v1.8.0

type BusinessAgentDto struct {
	Path   string                   `json:"path"`
	Config []*BusinessMonitorCfgObj `json:"config"`
}

type BusinessMetricObj added in v1.8.0

type BusinessMetricObj struct {
	Key     string `json:"key"`
	Metric  string `json:"metric"`
	Title   string `json:"title"`
	AggType string `json:"agg_type"`
}

type BusinessMonitorCfgObj added in v1.8.0

type BusinessMonitorCfgObj struct {
	Id           int                     `json:"id"`
	Regular      string                  `json:"regular"`
	Tags         string                  `json:"tags"`
	StringMap    []*BusinessStringMapObj `json:"string_map"`
	MetricConfig []*BusinessMetricObj    `json:"metric_config"`
}

type BusinessMonitorCfgTable added in v1.8.0

type BusinessMonitorCfgTable struct {
	Id                int    `json:"id"`
	BusinessMonitorId int    `json:"business_monitor_id"`
	Regular           string `json:"regular"`
	Tags              string `json:"tags"`
	StringMap         string `json:"string_map"`
	MetricConfig      string `json:"metric_config"`
}

type BusinessMonitorTable added in v1.0.1

type BusinessMonitorTable struct {
	Id            int    `json:"id"`
	EndpointId    int    `json:"endpoint_id"`
	Path          string `json:"path"`
	OwnerEndpoint string `json:"owner_endpoint"`
}

type BusinessStringMapObj added in v1.8.0

type BusinessStringMapObj struct {
	Key         string  `json:"key"`
	Regulation  string  `json:"regulation"`
	StringValue string  `json:"string_value"`
	IntValue    float64 `json:"int_value"`
}

type BusinessUpdateDto added in v1.0.1

type BusinessUpdateDto struct {
	EndpointId int                      `json:"endpoint_id" binding:"required"`
	PathList   []*BusinessUpdatePathObj `json:"path_list"`
}

type BusinessUpdatePathObj added in v1.8.0

type BusinessUpdatePathObj struct {
	Id            int                      `json:"id"`
	Path          string                   `json:"path"`
	OwnerEndpoint string                   `json:"owner_endpoint"`
	Rules         []*BusinessMonitorCfgObj `json:"rules"`
}

type ButtonModel

type ButtonModel struct {
	Id               int            `json:"id"`
	GroupId          int            `json:"group_id"`
	Name             string         `json:"name"`
	BType            string         `json:"b_type"`
	BText            string         `json:"b_text"`
	RefreshPanels    bool           `json:"refresh_panels"`
	RefreshCharts    bool           `json:"refresh_charts"`
	OptionGroup      int            `json:"option_group"`
	RefreshButton    int            `json:"refresh_button"`
	RefreshButtonUrl string         `json:"refresh_button_url"`
	Options          []*OptionModel `json:"option"`
}

type Chart

type Chart struct {
	Endpoint []string     `json:"endpoint"`
	Metric   []string     `json:"metric"`
	Option   EChartOption `json:"option"`
}

type ChartConfigObj

type ChartConfigObj struct {
	Id                 int    `form:"id" json:"id"`
	Title              string `form:"title" json:"title"`
	Endpoint           string `form:"endpoint" json:"endpoint"`
	Metric             string `form:"metric" json:"metric"`
	PromQl             string `form:"prom_ql" json:"prom_ql"`
	Start              string `form:"start" json:"start"`
	End                string `form:"end" json:"end"`
	Time               string `form:"time" json:"time"`
	Aggregate          string `form:"agg" json:"agg"`
	CompareFirstStart  string `form:"compare_first_start" json:"compare_first_start"`
	CompareFirstEnd    string `form:"compare_first_end" json:"compare_first_end"`
	CompareSecondStart string `form:"compare_second_start" json:"compare_second_start"`
	CompareSecondEnd   string `form:"compare_second_end" json:"compare_second_end"`
}

type ChartModel

type ChartModel struct {
	Id        int      `json:"id"`
	Col       int      `json:"col"`
	Title     string   `json:"title"`
	Endpoint  []string `json:"endpoint"`
	Metric    []string `json:"metric"`
	Url       string   `json:"url"`
	Aggregate string   `json:"aggregate"`
}

type ChartTable

type ChartTable struct {
	Id         int    `json:"id"`
	GroupId    int    `json:"group_id"`
	Endpoint   string `json:"endpoint"`
	Metric     string `json:"metric"`
	Col        int    `json:"col"`
	Url        string `json:"url"`
	Unit       string `json:"unit"`
	Title      string `json:"title"`
	GridType   string `json:"grid_type"`
	SeriesName string `json:"series_name"`
	Rate       bool   `json:"rate"`
	AggType    string `json:"agg_type"`
	Legend     string `json:"legend"`
}

type ClusterConfig added in v1.4.0

type ClusterConfig struct {
	Enable     bool     `json:"enable"`
	HttpPort   string   `json:"http_port"`
	ServerList []string `json:"server_list"`
}

type ConsulServicesDto added in v1.4.0

type ConsulServicesDto struct {
	Name string `json:"name"`
}

type CoreJwtToken added in v1.5.4

type CoreJwtToken struct {
	User   string   `json:"user"`
	Expire int64    `json:"expire"`
	Roles  []string `json:"roles"`
}

type CoreNotifyRequest added in v1.3.0

type CoreNotifyRequest struct {
	EventSeqNo      string `json:"eventSeqNo"`
	EventType       string `json:"eventType"`
	SourceSubSystem string `json:"sourceSubSystem"`
	OperationKey    string `json:"operationKey"`
	OperationData   string `json:"operationData"`
	NotifyRequired  string `json:"notifyRequired"`
	NotifyEndpoint  string `json:"notifyEndpoint"`
	OperationUser   string `json:"operationUser"`
}

type CoreNotifyResult added in v1.3.0

type CoreNotifyResult struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type CoreProcessDataObj added in v1.3.0

type CoreProcessDataObj struct {
	ProcDefId      string `json:"procDefId"`
	ProcDefKey     string `json:"procDefKey"`
	ProcDefName    string `json:"procDefName"`
	ProcDefVersion string `json:"procDefVersion"`
	ProcDefData    string `json:"procDefData"`
	RootEntity     string `json:"rootEntity"`
	Status         string `json:"status"`
	CreatedTime    string `json:"createdTime"`
}

type CoreProcessResult added in v1.3.0

type CoreProcessResult struct {
	Status  string                `json:"status"`
	Message string                `json:"message"`
	Data    CoreProcessResultData `json:"data"`
}

type CoreProcessResultData added in v1.3.0

type CoreProcessResultData []*CoreProcessDataObj

func (CoreProcessResultData) Len added in v1.3.0

func (s CoreProcessResultData) Len() int

func (CoreProcessResultData) Less added in v1.3.0

func (s CoreProcessResultData) Less(i, j int) bool

func (CoreProcessResultData) Swap added in v1.3.0

func (s CoreProcessResultData) Swap(i, j int)

type CoreRequestToken added in v1.5.2

type CoreRequestToken struct {
	Sub        string `json:"sub"`
	Iat        int64  `json:"iat"`
	Type       string `json:"type"`
	ClientType string `json:"clientType"`
	Exp        int64  `json:"exp"`
	Authority  string `json:"authority"`
}

type CoreRoleDataObj added in v1.4.0

type CoreRoleDataObj struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Email       string `json:"email"`
	DisplayName string `json:"displayName"`
}

type CoreRoleDto added in v1.4.0

type CoreRoleDto struct {
	Status  string            `json:"status"`
	Message string            `json:"message"`
	Data    []CoreRoleDataObj `json:"data"`
}

type CoreVariableFilter added in v1.9.0

type CoreVariableFilter struct {
	Name     string `json:"name"`
	Operator string `json:"operator"`
	Value    string `json:"value"`
}

type CoreVariablePage added in v1.9.0

type CoreVariablePage struct {
	PageSize   int `json:"pageSize"`
	StartIndex int `json:"startIndex"`
}

type CoreVariableResultContentObj added in v1.9.0

type CoreVariableResultContentObj struct {
	DefaultValue string `json:"defaultValue"`
	Id           string `json:"id"`
	Name         string `json:"name"`
	PackageName  string `json:"packageName"`
	Scope        string `json:"scope"`
	Source       string `json:"source"`
	Status       string `json:"status"`
	Value        string `json:"value"`
}

type CoreVariableResultData added in v1.9.0

type CoreVariableResultData struct {
	Contents []*CoreVariableResultContentObj `json:"contents"`
}

type CronJobConfig added in v1.5.0

type CronJobConfig struct {
	Enable   bool `json:"enable"`
	Interval int  `json:"interval"`
}

type CustomAlarmQueryParam added in v1.10.0

type CustomAlarmQueryParam struct {
	Enable bool
	Level  string
	Start  string
	End    string
	Status string
}

type CustomDashboardConfigObj added in v1.6.0

type CustomDashboardConfigObj struct {
	Query []*CustomDashboardConfigQueryObj `json:"query"`
}

type CustomDashboardConfigQueryObj added in v1.6.0

type CustomDashboardConfigQueryObj struct {
	Endpoint    string `json:"endpoint"`
	MetricLabel string `json:"metricLabel"`
	Metric      string `json:"metric"`
}

type CustomDashboardQuery added in v1.6.0

type CustomDashboardQuery struct {
	Id          int       `json:"id"`
	Name        string    `json:"name"`
	PanelsGroup int       `json:"panels_group"`
	Cfg         string    `json:"cfg"`
	Main        int       `json:"main"`
	CreateUser  string    `json:"create_user"`
	UpdateUser  string    `json:"update_user"`
	CreateAt    time.Time `json:"create_at"`
	UpdateAt    time.Time `json:"update_at"`
	MainPage    []string  `json:"main_page"`
}

type CustomDashboardRoleDto added in v1.6.0

type CustomDashboardRoleDto struct {
	DashboardId int   `json:"dashboard_id" binding:"required"`
	RoleId      []int `json:"role_id"`
}

type CustomDashboardTable

type CustomDashboardTable struct {
	Id          int       `json:"id"`
	Name        string    `json:"name"`
	PanelsGroup int       `json:"panels_group"`
	Cfg         string    `json:"cfg"`
	Main        int       `json:"main"`
	CreateUser  string    `json:"create_user"`
	UpdateUser  string    `json:"update_user"`
	CreateAt    time.Time `json:"create_at"`
	UpdateAt    time.Time `json:"update_at"`
}

type Dashboard

type Dashboard struct {
	Search  SearchModel    `json:"search"`
	Buttons []*ButtonModel `json:"buttons"`
	Message MessageModel   `json:"message"`
	Panels  PanelsModel    `json:"panels"`
}

type DashboardTable

type DashboardTable struct {
	Id            int    `json:"id"`
	DashboardType string `json:"dashboard_type"`
	SearchEnable  bool   `json:"search_enable"`
	SearchId      int    `json:"search_id"`
	ButtonEnable  bool   `json:"button_enable"`
	ButtonGroup   int    `json:"button_group"`
	MessageEnable bool   `json:"message_enable"`
	MessageGroup  int    `json:"message_group"`
	MessageUrl    string `json:"message_url"`
	PanelsEnable  bool   `json:"panels_enable"`
	PanelsType    string `json:"panels_type"`
	PanelsGroup   int    `json:"panels_group"`
	PanelsParam   string `json:"panels_param"`
}

type DataSort

type DataSort [][]float64

func (DataSort) Len

func (s DataSort) Len() int

func (DataSort) Less

func (s DataSort) Less(i, j int) bool

func (DataSort) Swap

func (s DataSort) Swap(i, j int)

type DataSourceConfig

type DataSourceConfig struct {
	Env        string               `json:"env"`
	Servers    []*DatasourceServers `json:"servers"`
	DivideTime int64                `json:"divide_time"`
	WaitTime   int                  `json:"wait_time"`
}

type DatasourceServers

type DatasourceServers struct {
	Id    int    `json:"id"`
	Type  string `json:"type"`
	Env   string `json:"env"`
	Host  string `json:"host"`
	Token string `json:"token"`
}

type DbMonitorConfigQuery added in v1.5.4

type DbMonitorConfigQuery struct {
	EndpointGuid    string `json:"endpoint_guid"`
	Name            string `json:"name"`
	Sql             string `json:"sql"`
	User            string `json:"user"`
	Password        string `json:"password"`
	InstanceAddress string `json:"instance_address"`
}

type DbMonitorListObj added in v1.5.4

type DbMonitorListObj struct {
	SysPanel      string            `json:"sys_panel"`
	SysPanelValue string            `json:"sys_panel_value"`
	Data          []*DbMonitorTable `json:"data"`
}

type DbMonitorSysNameDto added in v1.5.4

type DbMonitorSysNameDto struct {
	OldName    string `json:"old_name"`
	NewName    string `json:"new_name" binding:"required"`
	EndpointId int    `json:"endpoint_id" binding:"required"`
}

type DbMonitorTable added in v1.5.4

type DbMonitorTable struct {
	Id           int    `json:"id"`
	EndpointGuid string `json:"endpoint_guid"`
	Name         string `json:"name"`
	Sql          string `json:"sql"`
	SysPanel     string `json:"sys_panel"`
}

type DbMonitorTaskObj added in v1.5.4

type DbMonitorTaskObj struct {
	DbType   string `json:"db_type"`
	Endpoint string `json:"endpoint"`
	Name     string `json:"name"`
	Server   string `json:"server"`
	Port     string `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	Sql      string `json:"sql"`
}

type DbMonitorUpdateDto added in v1.5.4

type DbMonitorUpdateDto struct {
	Id         int    `json:"id"`
	EndpointId int    `json:"endpoint_id" binding:"required"`
	Name       string `json:"name" binding:"required"`
	Sql        string `json:"sql" binding:"required"`
	SysPanel   string `json:"sys_panel"`
}

type DefaultSortList added in v1.4.0

type DefaultSortList []*DefaultSortObj

func (DefaultSortList) Len added in v1.4.0

func (s DefaultSortList) Len() int

func (DefaultSortList) Less added in v1.4.0

func (s DefaultSortList) Less(i, j int) bool

func (DefaultSortList) Swap added in v1.4.0

func (s DefaultSortList) Swap(i, j int)

type DefaultSortObj added in v1.4.0

type DefaultSortObj struct {
	Key   string
	Value string
}

type DependenceConfig

type DependenceConfig struct {
	Name     string `json:"name"`
	Server   string `json:"server"`
	Username string `json:"username"`
	Password string `json:"password"`
	Expire   int    `json:"expire"`
}

type DisplayDemoFlagDto added in v1.5.1

type DisplayDemoFlagDto struct {
	Display bool `json:"display"`
}

type EChartOption

type EChartOption struct {
	Id     int            `json:"id"`
	Title  string         `json:"title"`
	Legend []string       `json:"legend"`
	Xaxis  interface{}    `json:"xaxis"`
	Yaxis  YaxisModel     `json:"yaxis"`
	Series []*SerialModel `json:"series"`
}

type EChartPie added in v1.5.0

type EChartPie struct {
	Title  string          `json:"title"`
	Legend []string        `json:"legend"`
	Data   []*EChartPieObj `json:"data"`
}

type EChartPieObj added in v1.5.0

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

type EndpointGrpParam added in v1.11.0

type EndpointGrpParam struct {
	EndpointId int   `json:"endpoint_id"`
	GroupIds   []int `json:"group_ids"`
}

type EndpointHttpTable added in v1.5.0

type EndpointHttpTable struct {
	Id           int    `json:"id"`
	EndpointGuid string `json:"endpoint_guid"`
	Method       string `json:"method"`
	Url          string `json:"url"`
}

type EndpointMetricTable

type EndpointMetricTable struct {
	Id         int    `json:"id"`
	EndpointId int    `json:"endpoint_id"`
	Metric     string `json:"metric"`
}

type EndpointTable

type EndpointTable struct {
	Id              int    `json:"id"`
	Guid            string `json:"guid"`
	Name            string `json:"name"`
	Ip              string `json:"ip"`
	EndpointVersion string `json:"endpoint_version"`
	ExportType      string `json:"export_type"`
	ExportVersion   string `json:"export_version"`
	Step            int    `json:"step"`
	Address         string `json:"address"`
	OsType          string `json:"os_type"`
	CreateAt        string `json:"create_at"`
	StopAlarm       int    `json:"stop_alarm"`
	AddressAgent    string `json:"address_agent"`
}

type EndpointTelnetObj added in v1.4.0

type EndpointTelnetObj struct {
	Note string `json:"note"`
	Port string `json:"port"`
}

type EndpointTelnetTable added in v1.4.0

type EndpointTelnetTable struct {
	Id           int    `json:"id"`
	EndpointGuid string `json:"endpoint_guid"`
	Port         string `json:"port"`
	Note         string `json:"note"`
}

type EntityQueryObj added in v1.3.0

type EntityQueryObj struct {
	AttrName  string `json:"attrName"`
	Op        string `json:"op"`
	Condition string `json:"condition"`
}

type EntityQueryParam added in v1.3.0

type EntityQueryParam struct {
	Criteria          EntityQueryObj    `json:"criteria"`
	AdditionalFilters []*EntityQueryObj `json:"additionalFilters"`
}

type ErrorMessageObj added in v1.5.3

type ErrorMessageObj struct {
	Language string `json:"language"`
	Success  string `json:"success"`

	ParamValidateError string `json:"param_validate_error"`
	ParamEmptyError    string `json:"param_empty_error"`
	ParamTypeError     string `json:"param_validate_type"`

	RequestBodyError          string `json:"request_body_error"`
	RequestJsonUnmarshalError string `json:"request_json_unmarshal_error"`

	QueryTableError     string `json:"query_table_error"`
	FetchTableDataError string `json:"fetch_table_data_error"`

	UpdateTableError     string `json:"update_table_error"`
	DeleteTableDataError string `json:"delete_table_data_error"`

	HandleError string `json:"handle_error"`

	PasswordError       string `json:"password_error"`
	TokenError          string `json:"token_error"`
	TokenAuthorityError string `json:"token_authority_error"`
}

type EventTreeventNodeParam added in v1.10.0

type EventTreeventNodeParam struct {
	EventId   string `json:"event_id"`
	Status    string `json:"status"`
	Endpoint  string `json:"endpoint"`
	Message   string `json:"message"`
	StartUnix int64  `json:"start_unix"`
}

type EventTreeventNotifyDto added in v1.10.0

type EventTreeventNotifyDto struct {
	Type string                    `json:"type"`
	Data []*EventTreeventNodeParam `json:"data"`
}

type EventTreeventResponse added in v1.10.0

type EventTreeventResponse struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
	Msg    string `json:"message"`
}

type FileSdConfig added in v1.5.0

type FileSdConfig []*FileSdObj

type FileSdLabel added in v1.5.0

type FileSdLabel struct {
	EGuid string `json:"e_guid"`
}

type FileSdObj added in v1.5.0

type FileSdObj struct {
	Targets []string    `json:"targets"`
	Labels  FileSdLabel `json:"labels"`
}

type GetOrgPanelCallbackData added in v1.3.0

type GetOrgPanelCallbackData struct {
	FiringCallback  []*OptionModel `json:"firing_callback"`
	RecoverCallback []*OptionModel `json:"recover_callback"`
}

type GlobalConfig

type GlobalConfig struct {
	Http             *HttpConfig         `json:"http"`
	Store            StoreConfig         `json:"store"`
	Datasource       DataSourceConfig    `json:"datasource"`
	LimitIp          []string            `json:"limitIp"`
	Dependence       []*DependenceConfig `json:"dependence"`
	Prometheus       PrometheusConfig    `json:"prometheus"`
	TagBlacklist     []string            `json:"tag_blacklist"`
	Agent            []*AgentConfig      `json:"agent"`
	Alert            AlertConfig         `json:"alert"`
	Cluster          ClusterConfig       `json:"cluster"`
	CronJob          CronJobConfig       `json:"cron_job"`
	SdFile           SdFileConfig        `json:"sd_file"`
	ArchiveMysql     ArchiveMysqlConfig  `json:"archive_mysql"`
	ProcessCheckList []string            `json:"process_check_list"`
	DefaultAdminRole string              `json:"default_admin_role"`
	AlarmAliveMaxDay int                 `json:"alarm_alive_max_day"`
}

func Config

func Config() *GlobalConfig

type GrpEndpointParam

type GrpEndpointParam struct {
	Grp       int      `json:"grp" binding:"required"`
	Endpoints []string `json:"endpoints"`
}

type GrpEndpointParamNew

type GrpEndpointParamNew struct {
	Grp       int    `json:"grp" binding:"required"`
	Endpoints []int  `json:"endpoints"`
	Operation string `json:"operation" binding:"required"`
}

type GrpEndpointTable

type GrpEndpointTable struct {
	GrpId      int `json:"grp_id"`
	EndpointId int `json:"endpoint_id"`
}

type GrpQuery

type GrpQuery struct {
	Id        int
	Name      string
	Search    string
	User      string
	Page      int
	Size      int
	Result    []*GrpTable
	ResultNum int
}

type GrpStrategyExportObj added in v1.0.1

type GrpStrategyExportObj struct {
	GrpName     string          `json:"grp_name"`
	Description string          `json:"description"`
	Strategy    []StrategyTable `json:"strategy"`
}

type GrpStrategyQuery added in v1.0.1

type GrpStrategyQuery struct {
	Name        string
	Description string
	Metric      string
	Expr        string
	Cond        string
	Last        string
	Priority    string
	Content     string
	ConfigType  string
}

type GrpTable

type GrpTable struct {
	Id           int       `json:"id"`
	Name         string    `json:"name"`
	Parent       int       `json:"parent"`
	Description  string    `json:"description"`
	CreateUser   string    `json:"create_user"`
	UpdateUser   string    `json:"update_user"`
	EndpointType string    `json:"endpoint_type"`
	CreateAt     time.Time `json:"create_at"`
	UpdateAt     time.Time `json:"update_at"`
}

type HttpConfig

type HttpConfig struct {
	Port            string         `json:"port"`
	Swagger         bool           `json:"swagger"`
	Cross           bool           `json:"cross"`
	ReturnError     bool           `json:"return_error"`
	Alive           int64          `json:"alive"`
	Ldap            *LdapConfig    `json:"ldap"`
	Log             *LogConfig     `json:"log"`
	Session         *SessionConfig `json:"session"`
	DefaultLanguage string         `json:"default_language"`
}

type IsPluginModeResult added in v1.3.0

type IsPluginModeResult struct {
	IsPlugin bool `json:"is_plugin"`
}

type KubernetesClusterParam added in v1.7.0

type KubernetesClusterParam struct {
	Id          int    `json:"id"`
	ClusterName string `json:"cluster_name" binding:"required"`
	Ip          string `json:"ip" binding:"required"`
	Port        string `json:"port" binding:"required"`
	Token       string `json:"token" binding:"required"`
}

type KubernetesClusterTable added in v1.7.0

type KubernetesClusterTable struct {
	Id          int       `json:"id"`
	ClusterName string    `json:"cluster_name"`
	ApiServer   string    `json:"api_server"`
	Token       string    `json:"token"`
	CreateAt    time.Time `json:"create_at"`
}

type KubernetesEndpointRelTable added in v1.7.0

type KubernetesEndpointRelTable struct {
	Id           int    `json:"id"`
	KuberneteId  int    `json:"kubernete_id"`
	EndpointGuid string `json:"endpoint_guid"`
	PodGuid      string `json:"pod_guid"`
	Namespace    string `json:"namespace"`
}

type LdapConfig

type LdapConfig struct {
	Enable     bool     `json:"enable"`
	Server     string   `json:"server"`
	Port       int      `json:"port"`
	BindDN     string   `json:"bindDN"`
	BaseDN     string   `json:"baseDN"`
	Filter     string   `json:"filter"`
	Attributes []string `json:"attributes"`
}

type LogConfig

type LogConfig struct {
	Level            string `json:"level"`
	File             string `json:"file"`
	AccessFile       string `json:"access_file"`
	ArchiveMaxSize   int    `json:"archive_max_size"`
	ArchiveMaxBackup int    `json:"archive_max_backup"`
	ArchiveMaxDay    int    `json:"archive_max_day"`
	Compress         bool   `json:"compress"`
}

type LogMonitorDto

type LogMonitorDto struct {
	Id            int                      `json:"id"`
	TplId         int                      `json:"tpl_id"`
	GrpId         int                      `json:"grp_id"`
	EndpointId    int                      `json:"endpoint_id"`
	Path          string                   `json:"path" binding:"required"`
	OwnerEndpoint string                   `json:"owner_endpoint"`
	Strategy      []*LogMonitorStrategyDto `json:"strategy"`
}

type LogMonitorStrategyDto

type LogMonitorStrategyDto struct {
	Id           int    `json:"id"`
	StrategyId   int    `json:"strategy_id"`
	Keyword      string `json:"keyword"`
	Cond         string `json:"cond"`
	Last         string `json:"last"`
	Priority     string `json:"priority"`
	NotifyEnable int    `json:"notify_enable"`
}

type LogMonitorTable

type LogMonitorTable struct {
	Id            int    `json:"id"`
	StrategyId    int    `json:"strategy_id"`
	Path          string `json:"path"`
	Keyword       string `json:"keyword"`
	Priority      string `json:"priority"`
	NotifyEnable  int    `json:"notify_enable"`
	OwnerEndpoint string `json:"owner_endpoint"`
}

type LogMonitorTags added in v1.5.4

type LogMonitorTags struct {
	Endpoint string `json:"endpoint"`
	FilePath string `json:"file_path"`
	Keyword  string `json:"keyword"`
	Tags     string `json:"tags"`
}

type MainPageRoleQuery added in v1.6.0

type MainPageRoleQuery struct {
	RoleName     string         `json:"role_name"`
	MainPageId   int            `json:"main_page_id"`
	MainPageName string         `json:"main_page_name"`
	Options      []*OptionModel `json:"options"`
}

type MaintainDto

type MaintainDto struct {
	Start         int64  `json:"start"`
	End           int64  `json:"end"`
	Endpoint      string `json:"endpoint"`
	Ip            string `json:"ip"`
	EndpointType  string `json:"endpoint_type"`
	ClearMaintain bool   `json:"clear_maintain"`
}

type MaintainTable

type MaintainTable struct {
	Id            int       `json:"id"`
	EndpointId    int       `json:"endpoint_id"`
	MaintainStart time.Time `json:"maintain_start"`
	MaintainEnd   time.Time `json:"maintain_end"`
	MaintainUser  string    `json:"maintain_user"`
}

type MessageModel

type MessageModel struct {
	Enable bool   `json:"enable"`
	Url    string `json:"url"`
}

type MessageTable

type MessageTable struct {
	Id      int    `json:"id"`
	GroupId int    `json:"group_id"`
	K       string `json:"k"`
	Rename  string `json:"rename"`
	Col     string `json:"col"`
	Href    bool   `json:"href"`
	Url     string `json:"url"`
}

type OpenAlarmObj added in v1.0.1

type OpenAlarmObj struct {
	Id           int       `json:"id"`
	AlertInfo    string    `json:"alert_info"`
	AlertIp      string    `json:"alert_ip"`
	AlertLevel   string    `json:"alert_level"`
	AlertObj     string    `json:"alert_obj"`
	AlertTitle   string    `json:"alert_title"`
	UseUmgPolicy string    `json:"use_umg_policy"`
	AlertWay     string    `json:"alert_way"`
	AlertReciver string    `json:"alert_reciver"`
	RemarkInfo   string    `json:"remark_info"`
	SubSystemId  string    `json:"sub_system_id"`
	UpdateAt     time.Time `json:"update_at"`
}

type OpenAlarmRequest added in v1.0.1

type OpenAlarmRequest struct {
	AlertList []OpenAlarmObj `json:"alertList"`
}

type OpenAlarmResponse added in v1.0.1

type OpenAlarmResponse struct {
	ResultCode int    `json:"resultCode"`
	ResultMsg  string `json:"resultMsg"`
}

type OptionModel

type OptionModel struct {
	Id             int    `json:"id"`
	OptionValue    string `json:"option_value"`
	OptionText     string `json:"option_text"`
	Active         bool   `json:"active"`
	OptionType     string `json:"type"`
	OptionTypeName string `json:"option_type_name"`
}

type OptionModelSortList added in v1.9.0

type OptionModelSortList []*OptionModel

func (OptionModelSortList) Len added in v1.9.0

func (e OptionModelSortList) Len() int

func (OptionModelSortList) Less added in v1.9.0

func (e OptionModelSortList) Less(i, j int) bool

func (OptionModelSortList) Swap added in v1.9.0

func (e OptionModelSortList) Swap(i, j int)

type OrganizationPanel added in v1.3.0

type OrganizationPanel struct {
	Guid            string               `json:"guid"`
	DisplayName     string               `json:"display_name"`
	Type            string               `json:"type"`
	FetchSearch     bool                 `json:"fetch_search"`
	FetchOriginFlag bool                 `json:"fetch_origin_flag"`
	Children        []*OrganizationPanel `json:"children"`
}

type PanelChartQueryObj added in v1.10.0

type PanelChartQueryObj struct {
	Id         int    `json:"id"`
	TagsKey    string `json:"tags_key"`
	Title      string `json:"title"`
	GroupId    int    `json:"group_id"`
	Metric     string `json:"metric"`
	ChartTitle string `json:"chart_title"`
	ChartUnit  string `json:"chart_unit"`
}

type PanelModel

type PanelModel struct {
	Title  string        `json:"title"`
	Tags   TagsModel     `json:"tags"`
	Other  bool          `json:"other"`
	Charts []*ChartModel `json:"charts"`
}

type PanelRecursiveTable added in v1.1.0

type PanelRecursiveTable struct {
	Guid                string `json:"guid"`
	DisplayName         string `json:"display_name"`
	Parent              string `json:"parent"`
	Endpoint            string `json:"endpoint"`
	Email               string `json:"email"`
	Phone               string `json:"phone"`
	Role                string `json:"role"`
	FiringCallbackName  string `json:"firing_callback_name"`
	FiringCallbackKey   string `json:"firing_callback_key"`
	RecoverCallbackName string `json:"recover_callback_name"`
	RecoverCallbackKey  string `json:"recover_callback_key"`
	ObjType             string `json:"obj_type"`
}

type PanelResult added in v1.10.0

type PanelResult struct {
	PanelList    []*PanelResultObj   `json:"panel_list"`
	ActiveChart  PanelResultChartObj `json:"active_chart"`
	PanelGroupId int                 `json:"panel_group_id"`
}

type PanelResultChartObj added in v1.10.0

type PanelResultChartObj struct {
	Metric string `json:"metric"`
	Title  string `json:"title"`
	Unit   string `json:"unit"`
	Active bool   `json:"active"`
}

type PanelResultObj added in v1.10.0

type PanelResultObj struct {
	GroupId    int                    `json:"group_id"`
	PanelTitle string                 `json:"panel_title"`
	TagsKey    string                 `json:"tags_key"`
	Charts     []*PanelResultChartObj `json:"charts"`
}

type PanelTable

type PanelTable struct {
	Id          int    `json:"id"`
	GroupId     int    `json:"group_id"`
	Title       string `json:"title"`
	TagsEnable  bool   `json:"tags_enable"`
	TagsUrl     string `json:"tags_url"`
	TagsKey     string `json:"tags_key"`
	ChartGroup  int    `json:"chart_group"`
	AutoDisplay int    `json:"auto_display"`
}

type PanelTag

type PanelTag struct {
	Col      int      `json:"col"`
	Endpoint []string `json:"endpoint"`
	Metric   []string `json:"metric"`
	Url      string   `json:"url"`
}

type PanelsModel

type PanelsModel struct {
	Enable bool   `json:"enable"`
	Type   string `json:"type"`
	Url    string `json:"url"`
}

type PingExportSourceObj added in v1.4.0

type PingExportSourceObj struct {
	Ip   string `json:"ip"`
	Guid string `json:"guid"`
}

type PingExporterSourceDto added in v1.4.0

type PingExporterSourceDto struct {
	Config []*PingExportSourceObj `json:"config"`
}

type ProcessMonitorTable added in v1.0.1

type ProcessMonitorTable struct {
	Id          int    `json:"id"`
	EndpointId  int    `json:"endpoint_id"`
	ProcessName string `json:"process_name"`
	DisplayName string `json:"display_name"`
	Tags        string `json:"tags"`
}

type ProcessUpdateDto added in v1.0.1

type ProcessUpdateDto struct {
	EndpointId  int                   `json:"endpoint_id" binding:"required"`
	ProcessList []ProcessMonitorTable `json:"process_list"`
	Check       bool                  `json:"check"`
}

type ProcessUpdateDtoNew added in v1.5.4

type ProcessUpdateDtoNew struct {
	EndpointId  int                   `json:"endpoint_id" binding:"required"`
	ProcessList []ProcessMonitorTable `json:"process_list"`
	Check       bool                  `json:"check"`
}

type PromMetricTable

type PromMetricTable struct {
	Id         int    `json:"id"`
	Metric     string `json:"metric" binding:"required"`
	MetricType string `json:"metric_type"`
	PromQl     string `json:"prom_ql" binding:"required"`
	PromMain   string `json:"prom_main"`
}

type PromMetricUpdateChartParam added in v1.10.0

type PromMetricUpdateChartParam struct {
	Metric string `json:"metric"`
	Title  string `json:"title"`
	Unit   string `json:"unit"`
}

type PromMetricUpdateParam added in v1.10.0

type PromMetricUpdateParam struct {
	Id         int                        `json:"id"`
	PanelId    int                        `json:"panel_id"`
	Chart      PromMetricUpdateChartParam `json:"chart"`
	Metric     string                     `json:"metric" binding:"required"`
	MetricType string                     `json:"metric_type"`
	PromQl     string                     `json:"prom_ql"`
	PromMain   string                     `json:"prom_main"`
}

type PrometheusConfig

type PrometheusConfig struct {
	ConfigPath   string `json:"config_path"`
	ConfigReload string `json:"config_reload"`
}

type PrometheusData

type PrometheusData struct {
	Result     []PrometheusResult `json:"result"`
	ResultType string             `json:"resultType"`
}

type PrometheusParam

type PrometheusParam struct {
	Start int64  `json:"start"`
	End   int64  `json:"end"`
	Step  int64  `json:"step"`
	Query string `json:"query"`
}

type PrometheusResponse

type PrometheusResponse struct {
	Status string         `json:"status"`
	Data   PrometheusData `json:"data"`
}

type PrometheusResult

type PrometheusResult struct {
	Metric map[string]string `json:"metric"`
	Values [][]interface{}   `json:"values"`
}

type QueryHistoryAlarmParam added in v1.6.0

type QueryHistoryAlarmParam struct {
	Start    int64  `json:"start" binding:"required"`
	End      int64  `json:"end" binding:"required"`
	Filter   string `json:"filter" binding:"required"`
	Endpoint string `json:"endpoint"`
	Metric   string `json:"metric"`
	Priority string `json:"priority"`
}

type QueryMonitorData

type QueryMonitorData struct {
	Start         int64     `json:"start"`
	End           int64     `json:"end"`
	Endpoint      []string  `json:"endpoint"`
	Metric        []string  `json:"metric"`
	PromQ         string    `json:"prom_q"`
	Legend        string    `json:"legend"`
	CompareLegend string    `json:"compare_legend"`
	ChartType     string    `json:"chart_type"`
	PieData       EChartPie `json:"pie_data"`
	SameEndpoint  bool      `json:"same_endpoint"`
	Step          int       `json:"step"`
}

type QueryProblemAlarmDto added in v1.6.0

type QueryProblemAlarmDto struct {
	Endpoint string `json:"endpoint"`
	Metric   string `json:"metric"`
	Priority string `json:"priority"`
}

type RFAnnotation

type RFAnnotation struct {
	Summary     string `yaml:"summary"`
	Description string `yaml:"description"`
}

type RFGroup

type RFGroup struct {
	Name  string    `yaml:"name"`
	Rules []*RFRule `yaml:"rules"`
}

RF -> RuleFile

type RFRule

type RFRule struct {
	Alert       string            `yaml:"alert"`
	Expr        string            `yaml:"expr"`
	For         string            `yaml:"for"`
	Labels      map[string]string `yaml:"labels"`
	Annotations RFAnnotation      `yaml:"annotations"`
}

type RecursivePanelObj added in v1.2.0

type RecursivePanelObj struct {
	DisplayName string               `json:"display_name"`
	Charts      []*ChartModel        `json:"charts"`
	Children    []*RecursivePanelObj `json:"children"`
}

type RegisterConsulCheck

type RegisterConsulCheck struct {
	Http     string `json:"http"`
	Interval string `json:"interval"`
}

type RegisterConsulParam

type RegisterConsulParam struct {
	Id      string                 `json:"id"`
	Name    string                 `json:"name"`
	Address string                 `json:"address"`
	Port    int                    `json:"port"`
	Tags    []string               `json:"tags"`
	Checks  []*RegisterConsulCheck `json:"checks"`
}

type RegisterParam

type RegisterParam struct {
	Type         string `json:"type" form:"type" binding:"required"`
	ExporterIp   string `json:"exporter_ip" form:"exporter_ip" binding:"required"`
	ExporterPort string `json:"exporter_port" form:"exporter_port" binding:"required"`
	Instance     string `json:"instance" form:"instance"`
	User         string `json:"user"`
	Password     string `json:"password"`
}

type RegisterParamNew added in v1.5.0

type RegisterParamNew struct {
	Type             string `json:"type" binding:"required"`
	Name             string `json:"name"`
	Ip               string `json:"ip"`
	Port             string `json:"port"`
	User             string `json:"user"`
	Password         string `json:"password"`
	Method           string `json:"method"`
	Url              string `json:"url"`
	AddDefaultGroup  bool   `json:"add_default_group"`
	DefaultGroupName string `json:"default_group_name"`
	AgentManager     bool   `json:"agent_manager"`
	FetchMetric      bool   `json:"fetch_metric"`
	Step             int    `json:"step"`
	ExportAddress    string `json:"export_address"`
	Cluster          string `json:"cluster"`
	ProxyExporter    string `json:"proxy_exporter"`
}

type RelRoleGrpTable added in v1.3.0

type RelRoleGrpTable struct {
	Id     int `json:"id"`
	RoleId int `json:"role_id"`
	GrpId  int `json:"grp_id"`
}

type RelRoleUserTable added in v1.1.0

type RelRoleUserTable struct {
	Id     int `json:"id"`
	RoleId int `json:"role_id"`
	UserId int `json:"user_id"`
}

type RequestCoreVariableDto added in v1.9.0

type RequestCoreVariableDto struct {
	Filters  []*CoreVariableFilter `json:"filters"`
	Pageable CoreVariablePage      `json:"pageable"`
	Paging   bool                  `json:"paging"`
}

type RequestCoreVariableResult added in v1.9.0

type RequestCoreVariableResult struct {
	Data    CoreVariableResultData `json:"data"`
	Message string                 `json:"message"`
	Status  string                 `json:"status"`
}

type RoleGrpDto added in v1.3.0

type RoleGrpDto struct {
	GrpId  int   `json:"grp_id"`
	RoleId []int `json:"role_id"`
}

type RoleQuery added in v1.1.0

type RoleQuery struct {
	Id            int       `json:"id"`
	Name          string    `json:"name"`
	DisplayName   string    `json:"display_name"`
	Email         string    `json:"email"`
	Creator       string    `json:"creator"`
	Created       time.Time `json:"created"`
	CreatedString string    `json:"created_string"`
}

type RoleTable added in v1.0.1

type RoleTable struct {
	Id            int       `json:"id"`
	Name          string    `json:"name"`
	DisplayName   string    `json:"display_name"`
	Email         string    `json:"email"`
	Parent        int       `json:"parent"`
	Creator       string    `json:"creator"`
	Created       time.Time `json:"created"`
	MainDashboard int       `json:"main_dashboard"`
	Disable       int       `json:"disable"`
}

type RuleFile

type RuleFile struct {
	Groups []*RFGroup `yaml:"groups"`
}

type SdFileConfig added in v1.5.0

type SdFileConfig struct {
	Enable bool   `json:"enable"`
	Path   string `json:"path"`
}

type SearchModel

type SearchModel struct {
	Id             int    `json:"id"`
	Enable         bool   `json:"enable"`
	Name           string `json:"name"`
	SearchUrl      string `json:"search_url"`
	SearchCol      string `json:"search_col"`
	RefreshPanels  bool   `json:"refresh_panels"`
	RefreshMessage bool   `json:"refresh_message"`
}

type SendAlertObj added in v1.1.0

type SendAlertObj struct {
	Accept  []string
	Subject string
	Content string
}

type SerialModel

type SerialModel struct {
	Type string      `json:"type"`
	Name string      `json:"name"`
	Data [][]float64 `json:"data"`
}

type ServiceDiscoverFileList added in v1.5.0

type ServiceDiscoverFileList []*ServiceDiscoverFileObj

func (ServiceDiscoverFileList) TurnToFileSdConfigByte added in v1.5.0

func (s ServiceDiscoverFileList) TurnToFileSdConfigByte(step int) []byte

type ServiceDiscoverFileObj added in v1.5.0

type ServiceDiscoverFileObj struct {
	Guid    string `json:"guid"`
	Address string `json:"address"`
	Step    int    `json:"step"`
}

type Session

type Session struct {
	User   string `json:"user"`
	Token  string `json:"token"`
	Expire int64  `json:"expire"`
}

type SessionConfig added in v1.0.1

type SessionConfig struct {
	Enable       bool               `json:"enable"`
	Expire       int64              `json:"expire"`
	ServerEnable bool               `json:"server_enable"`
	ServerToken  string             `json:"server_token"`
	Redis        SessionRedisConfig `json:"redis"`
}

type SessionRedisConfig added in v1.0.1

type SessionRedisConfig struct {
	Enable  bool   `json:"enable"`
	Server  string `json:"server"`
	Port    int    `json:"port"`
	Pwd     string `json:"pwd"`
	Db      int    `json:"db"`
	MaxIdle int    `json:"max_idle"`
}

type SnmpEndpointRelTable added in v1.11.1

type SnmpEndpointRelTable struct {
	Id           int    `json:"id"`
	SnmpExporter string `json:"snmp_exporter"`
	EndpointGuid string `json:"endpoint_guid"`
	Target       string `json:"target"`
}

type SnmpExporterTable added in v1.11.1

type SnmpExporterTable struct {
	Id       string    `json:"id" binding:"required"`
	Address  string    `json:"address" binding:"required"`
	Modules  string    `json:"modules"`
	CreateAt time.Time `json:"create_at"`
	UpdateAt time.Time `json:"update_at"`
}

type StoreConfig

type StoreConfig struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Server   string `json:"server"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Pwd      string `json:"pwd"`
	DataBase string `json:"database"`
	MaxOpen  int    `json:"maxOpen"`
	MaxIdle  int    `json:"maxIdle"`
	Timeout  int    `json:"timeout"`
}

type StrategyTable

type StrategyTable struct {
	Id           int    `json:"id"`
	TplId        int    `json:"tpl_id"`
	Metric       string `json:"metric" binding:"required"`
	Expr         string `json:"expr" binding:"required"`
	Cond         string `json:"cond" binding:"required"`
	Last         string `json:"last" binding:"required"`
	Priority     string `json:"priority" binding:"required"`
	Content      string `json:"content" binding:"required"`
	ConfigType   string `json:"config_type"`
	NotifyEnable int    `json:"notify_enable"`
	NotifyDelay  int    `json:"notify_delay"`
}

type SyncConsulDto added in v1.4.0

type SyncConsulDto struct {
	IsRegister bool     `json:"is_register"`
	Guid       string   `json:"guid"`
	Ip         string   `json:"ip"`
	Port       string   `json:"port"`
	Tags       []string `json:"tags"`
	Interval   int      `json:"interval"`
}

type SyncSdConfigDto added in v1.9.0

type SyncSdConfigDto struct {
	IsRegister bool     `json:"is_register"`
	Guid       string   `json:"guid"`
	Ip         string   `json:"ip"`
	Port       string   `json:"port"`
	Tags       []string `json:"tags"`
	Step       int      `json:"step"`
}

type TableData

type TableData struct {
	Data interface{} `json:"data"`
	Page int         `json:"page"`
	Size int         `json:"size"`
	Num  int         `json:"num"`
}

type TagsModel

type TagsModel struct {
	Enable bool           `json:"enable"`
	Url    string         `json:"url"`
	Option []*OptionModel `json:"option"`
}

type TelnetSourceQuery added in v1.4.0

type TelnetSourceQuery struct {
	Guid string `json:"guid"`
	Ip   string `json:"ip"`
	Port int    `json:"port"`
}

type TplObj

type TplObj struct {
	TplId      int              `json:"tpl_id"`
	ObjId      int              `json:"obj_id"`
	ObjName    string           `json:"obj_name"`
	ObjType    string           `json:"obj_type"`
	Operation  bool             `json:"operation"`
	Accept     []*OptionModel   `json:"accept"`
	Strategy   []*StrategyTable `json:"strategy"`
	LogMonitor []*LogMonitorDto `json:"log_monitor"`
}

type TplQuery

type TplQuery struct {
	SearchType string    `json:"search_type"`
	SearchId   int       `json:"search_id"`
	Tpl        []*TplObj `json:"tpl"`
}

type TplStrategyLogMonitorTable

type TplStrategyLogMonitorTable struct {
	TplId        int    `json:"tpl_id"`
	GrpId        int    `json:"grp_id"`
	LogMonitorId int    `json:"log_monitor_id"`
	EndpointId   int    `json:"endpoint_id"`
	StrategyId   int    `json:"strategy_id"`
	Expr         string `json:"expr" binding:"required"`
	Cond         string `json:"cond" binding:"required"`
	Last         string `json:"last"`
	Priority     string `json:"priority" binding:"required"`
	Path         string `json:"path"`
	Keyword      string `json:"keyword"`
}

type TplStrategyTable

type TplStrategyTable struct {
	TplId        int    `json:"tpl_id"`
	GrpId        int    `json:"grp_id"`
	EndpointId   int    `json:"endpoint_id"`
	StrategyId   int    `json:"strategy_id"`
	Metric       string `json:"metric" binding:"required"`
	Expr         string `json:"expr" binding:"required"`
	Cond         string `json:"cond" binding:"required"`
	Last         string `json:"last" binding:"required"`
	Priority     string `json:"priority" binding:"required"`
	Content      string `json:"content" binding:"required"`
	NotifyEnable int    `json:"notify_enable"`
	NotifyDelay  int    `json:"notify_delay"`
}

type TplTable

type TplTable struct {
	Id         int       `json:"id"`
	GrpId      int       `json:"grp_id"`
	EndpointId int       `json:"endpoint_id"`
	NotifyUrl  string    `json:"notify_url"`
	CreateUser string    `json:"create_user"`
	UpdateUser string    `json:"update_user"`
	ActionUser string    `json:"action_user"`
	ActionRole string    `json:"action_role"`
	ExtraMail  string    `json:"extra_mail"`
	ExtraPhone string    `json:"extra_phone"`
	CreateAt   time.Time `json:"create_at"`
	UpdateAt   time.Time `json:"update_at"`
}

type TransGatewayMetricDto added in v1.3.0

type TransGatewayMetricDto struct {
	Params []*TransGatewayRequestDto `json:"params"`
}

type TransGatewayRequestDto added in v1.3.0

type TransGatewayRequestDto struct {
	Name    string   `json:"name"`
	HostIp  string   `json:"host_ip"`
	Address string   `json:"address"`
	Metrics []string `json:"metrics"`
}

type UpdateActionDto added in v1.1.0

type UpdateActionDto struct {
	TplId  int           `json:"tpl_id" binding:"required"`
	Accept []OptionModel `json:"accept"`
}

type UpdateChartTitleParam added in v1.4.0

type UpdateChartTitleParam struct {
	ChartId int    `json:"chart_id" binding:"required"`
	Metric  string `json:"metric"`
	Name    string `json:"name" binding:"required"`
}

type UpdateEndpointTelnetParam added in v1.4.0

type UpdateEndpointTelnetParam struct {
	Guid   string               `json:"guid" binding:"required"`
	Config []*EndpointTelnetObj `json:"config"`
}

type UpdateGrp

type UpdateGrp struct {
	Groups      []*GrpTable
	Operation   string
	OperateUser string
}

type UpdateLogMonitor

type UpdateLogMonitor struct {
	LogMonitor  []*LogMonitorTable
	Operation   string
	OperateUser string
}

type UpdateOrgConnectParam added in v1.5.0

type UpdateOrgConnectParam struct {
	Guid  string   `json:"guid" binding:"required"`
	Mail  []string `json:"mail"`
	Phone []string `json:"phone"`
}

type UpdateOrgPanelEndpointParam added in v1.3.0

type UpdateOrgPanelEndpointParam struct {
	Guid     string   `json:"guid" binding:"required"`
	Endpoint []string `json:"endpoint"`
}

type UpdateOrgPanelEventParam added in v1.3.0

type UpdateOrgPanelEventParam struct {
	Guid                string `json:"guid" binding:"required"`
	FiringCallbackName  string `json:"firing_callback_name"`
	FiringCallbackKey   string `json:"firing_callback_key"`
	RecoverCallbackName string `json:"recover_callback_name"`
	RecoverCallbackKey  string `json:"recover_callback_key"`
}

type UpdateOrgPanelParam added in v1.3.0

type UpdateOrgPanelParam struct {
	Guid        string `json:"guid"`
	DisplayName string `json:"display_name"`
	Parent      string `json:"parent"`
	Type        string `json:"type"`
}

type UpdateOrgPanelRoleParam added in v1.3.0

type UpdateOrgPanelRoleParam struct {
	Guid   string `json:"guid" binding:"required"`
	RoleId []int  `json:"role_id"`
}

type UpdateRoleDto added in v1.1.0

type UpdateRoleDto struct {
	RoleId      int    `json:"role_id"`
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	Email       string `json:"email"`
	Parent      int    `json:"parent"`
	Operator    string `json:"operator"`
	Operation   string `json:"operation" binding:"required"`
}

type UpdateRoleUserDto added in v1.1.0

type UpdateRoleUserDto struct {
	RoleId int   `json:"role_id" binding:"required"`
	UserId []int `json:"user_id"`
}

type UpdateStrategy

type UpdateStrategy struct {
	Strategy    []*StrategyTable
	Operation   string
	OperateUser string
}

type UpdateUserDto added in v1.0.1

type UpdateUserDto struct {
	NewPassword   string `form:"new_password" json:"new_password"`
	ReNewPassword string `form:"re_new_password" json:"re_new_password"`
	DisplayName   string `form:"display_name" json:"display_name"`
	Email         string `form:"email" json:"email"`
	Phone         string `form:"phone" json:"phone"`
}

type User

type User struct {
	Id       int    `json:"id" xorm:"id"`
	UserName string `json:"name" xorm:"name"`
	Password string `json:"pwd" xorm:"pwd"`
}

type UserQuery added in v1.1.0

type UserQuery struct {
	Id            int       `json:"id"`
	Name          string    `json:"name"`
	Passwd        string    `json:"passwd"`
	DisplayName   string    `json:"display_name"`
	Role          string    `json:"role"`
	Email         string    `json:"email"`
	Phone         string    `json:"phone"`
	Creator       string    `json:"creator"`
	Created       time.Time `json:"created"`
	CreatedString string    `json:"created_string"`
}

type UserTable

type UserTable struct {
	Id            int       `json:"id"`
	Name          string    `json:"name"`
	Passwd        string    `json:"passwd"`
	DisplayName   string    `json:"display_name"`
	Email         string    `json:"email"`
	Phone         string    `json:"phone"`
	ExtContactOne string    `json:"ext_contact_one"`
	ExtContactTwo string    `json:"ext_contact_two"`
	Created       time.Time `json:"created"`
}

type YaxisModel

type YaxisModel struct {
	Unit string `json:"unit"`
}

Jump to

Keyboard shortcuts

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