dragonfly

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandlerOption

type EventHandlerOption struct {
	Url     string `json:"url"`
	Channel string `json:"channel"`
}

type EventHandlerOptionSlack

type EventHandlerOptionSlack struct {
	Url     string `json:"url"`     // slack hook URL
	Channel string `json:"channel"` // slack 알람 채널 (#kapacitor-alert)
}

type EventHandlerOptionSmtp

type EventHandlerOptionSmtp struct {
	Host       string   `json:"host"`     // 서버 ex)localhost
	Port       string   `json:"port"`     //
	Username   string   `json:"username"` //
	Password   string   `json:"password"` //
	FromDomain string   `json:"from"`     //
	ToDomains  []string `json:"to"`       //
}

type McisMonitoringOnDemandInfo

type McisMonitoringOnDemandInfo struct {
	Result  string `json:"result"`
	Unit    string `json:"unit"`
	Desc    string `json:"desc"`
	Elapsed string `json:"elapsed"`
	Specid  string `json:"specid"`
}

멀티 클라우드 인프라 MCIS 온디맨드 모니터링 정보 결과용

type MonitoringConfig

type MonitoringConfig struct {
	AgentInterval     int `json:"agent_interval"`     //모니터링 에이전트 수집 주기
	CollectorInterval int `json:"collector_interval"` //모니터링 콜렉터 Aggregate 주기
	// ScheduleInterval  int `json:"schedule_interval"`
	MaxHostCount int `json:"max_host_count"` // 단일 콜렉터에서 수집하는 최대 가상머신 수
	// AgentTTL          int `json:"agent_TTL"`
	MonitoringPolicy string `json:"monitoring_policy"`
}

모니터링 정책 설정

type MonitoringConfigReg

type MonitoringConfigReg struct {
	AgentInterval     int `json:"agent_interval"`     //모니터링 에이전트 수집 주기
	CollectorInterval int `json:"collector_interval"` //모니터링 콜렉터 Aggregate 주기
	MaxHostCount      int `json:"max_host_count"`     // 단일 콜렉터에서 수집하는 최대 가상머신 수
}

모니터링 정책 설정 Put 할때는 아래 3가지만 보냄

type VmMonitoring

type VmMonitoring struct {
	NameSpaceID        string `json:"nameSpaceID"`
	McisID             string `json:"mcisID"`
	VmID               string `json:"vmID"`
	Metric             string `json:"metric"`
	PeriodType         string `json:"periodType"`
	StatisticsCriteria string `json:"statisticsCriteria"`
	Duration           string `json:"duration"`
}

VM Monitoring 시 parameter 전달용

type VmMonitoringAlertEventHandlerInfo

type VmMonitoringAlertEventHandlerInfo struct {
	EventHandlerID string             `json:"id"`      // 네임스페이스 아이디
	Name           string             `json:"name"`    // 이벤트 핸들러 이름
	Type           string             `json:"type"`    // 네임스페이스 아이디
	Options        EventHandlerOption `json:"options"` //

}

알람 이벤트 핸들러

type VmMonitoringAlertEventHandlerInfoReg

type VmMonitoringAlertEventHandlerInfoReg struct {
	Name string `json:"name"` // 이벤트 핸들러 이름
	Type string `json:"type"` // 네임스페이스 아이디
	//Options EventHandlerOption `json:"options"` //
	Url     string `json:"url"`
	Channel string `json:"channel"`
}

알람 이벤트 핸들러

type VmMonitoringAlertEventHandlerSlackInfo

type VmMonitoringAlertEventHandlerSlackInfo struct {
	EventHandlerID string                  `json:"id"`      // 네임스페이스 아이디
	Name           string                  `json:"name"`    // 이벤트 핸들러 이름
	Type           string                  `json:"type"`    // 이벤트 핸들러 유형 ( "slack" | "smtp" )
	Options        EventHandlerOptionSlack `json:"options"` //
}

알람 이벤트 핸들러 type이 slack이면 option항목에 url, channel

type VmMonitoringAlertEventHandlerSmtpInfo

type VmMonitoringAlertEventHandlerSmtpInfo struct {
	EventHandlerID string                 `json:"id"`      // 네임스페이스 아이디
	Name           string                 `json:"name"`    // 이벤트 핸들러 이름
	Type           string                 `json:"type"`    // 이벤트 핸들러 유형 ( "slack" | "smtp" )
	Options        EventHandlerOptionSmtp `json:"options"` //
}

알람 이벤트 핸들러 type이 slack이면 option항목에 url, channel

type VmMonitoringAlertInfo

type VmMonitoringAlertInfo struct {
	AlertName           string `json:"name"`                  // 알람 이름
	Measurement         string `json:"measurement"`           // 알람 메트릭 유형 ( "cpu" | "mem" | "disk" )
	TargetType          string `json:"target_type"`           // 알람 임계치 타겟 유형 ( "NS" | "MCIS" | "VM" )
	TargetID            string `json:"target_id"`             // 알람 임계치 타겟 아이디
	EventDuration       string `json:"event_duration"`        // 알람 주기
	Metric              string `json:"metric"`                // 알람 메트릭
	AlertMathExpression string `json:"alert_math_expression"` // 알람 임계치 정규식 ( "equal" | "greater" | "equalgreater" | "less" | "equalless" )
	AlertThreshold      int    `json:"alert_threshold"`       // 알람 임계치 값
	WarnEventCnt        int    `json:"warn_event_cnt"`        // 알람 임계치 횟수 (warn)
	CriticEventCnt      int    `json:"critic_event_cnt"`      // 알람 임계치 횟수 (critic)
	AlertEventType      string `json:"alert_event_type"`      // 이벤트 핸들러 유형 ( "slack" | "smtp" )
	AlertEventName      string `json:"alert_event_name"`      // 이벤트 핸들러 이름
	AlertEventMessage   string `json:"alert_event_message"`   // 이벤트 핸들러 메세지
}

type VmMonitoringAlertLog

type VmMonitoringAlertLog struct {
	Id      string    `json:"id"`
	Time    time.Time `json:"time"`
	Level   string    `json:"level"`
	Message string    `json:"message"`
}

type VmMonitoringInfo

type VmMonitoringInfo struct {
	ValuesByCpu     VmMonitoringInfoByCpu
	ValuesByDisk    VmMonitoringInfoByDisk
	ValuesByMemory  VmMonitoringInfoByMemory
	ValuesByNetwork VmMonitoringInfoByNetwork
}

type VmMonitoringInfoByCpu added in v0.4.5

type VmMonitoringInfoByCpu struct {
	Name       string                   `json:"name"`
	Tags       VmMonitoringTag          `json:"tags"`
	ValuesList []VmMonitoringValueByCpu `json:"values"`
}

type VmMonitoringInfoByDisk added in v0.4.5

type VmMonitoringInfoByDisk struct {
	Name       string                    `json:"name"`
	Tags       VmMonitoringTag           `json:"tags"`
	ValuesList []VmMonitoringValueByDisk `json:"values"`
}

Monitoring 수신 Data return용

type VmMonitoringInfoByMemory added in v0.4.5

type VmMonitoringInfoByMemory struct {
	Name       string                      `json:"name"`
	Tags       VmMonitoringTag             `json:"tags"`
	ValuesList []VmMonitoringValueByMemory `json:"values"`
}

Monitoring 수신 Data return용

type VmMonitoringInfoByNetwork added in v0.4.5

type VmMonitoringInfoByNetwork struct {
	Name       string                       `json:"name"`
	Tags       VmMonitoringTag              `json:"tags"`
	ValuesList []VmMonitoringValueByNetwork `json:"values"`
}

Monitoring 수신 Data return용

type VmMonitoringInstallReg

type VmMonitoringInstallReg struct {
	NameSpaceID string `json:"ns_id"`     // 네임스페이스 아이디
	McisID      string `json:"mcis_id"`   // MCIS 아이디
	VmID        string `json:"vm_id"`     // VM 아이디
	PublicIp    string `json:"public_ip"` // VM의 퍼블릭 아이피
	UserName    string `json:"user_name"` // VM의 SSH 접속 계정(cb-user)
	SshKey      string `json:"ssh_key"`   // VM의 SSH 접근 키
	SshKeyName  string `json:"ssh_key_name"`
	CspType     string `json:"cspType"` // VM의 CSP 정보 (aws ... 등)
	Port        string `json:"port"`
}

Dragonfly에서 사용하는 AgentInstall

type VmMonitoringOnDemand

type VmMonitoringOnDemand struct {
	NameSpaceID string `json:"ns_id"`
	McisID      string `json:"mcis_id"`
	VmID        string `json:"vm_id"`
	AgentIp     string `json:"agent_ip"`
	MetricName  string `json:"metric_name"` // 메트릭 정보 ( "InitDB" | "ResetDB" | "CpuM" | "CpuS" | "MemR" | "MemW" | "FioW" | "FioR" | "DBW" | DBR" | "Rtt" | "Mrtt" )
}

멀티 클라우드 인프라 VM 온디맨드 모니터링 정보 조회용

type VmMonitoringOnDemandInfo

type VmMonitoringOnDemandInfo struct {
	NameSpaceID        string                    `json:"name"`
	VmMonitoringTags   VmMonitoringTagOnDemand   `json:"tags"`
	Time               string                    `json:"time"`
	VmMonitoringValues VmMonitoringValueOnDemand `json:"values"`
}

멀티 클라우드 인프라 VM 온디맨드 모니터링 정보 결과용

type VmMonitoringTag

type VmMonitoringTag struct {
	VmID string `json:"vmId"`
}

type VmMonitoringTagOnDemand

type VmMonitoringTagOnDemand struct {
	McisId string `json:"mcisId"`
	NsId   string `json:"nsId"`
	VmId   string `json:"vmId"`
}

type VmMonitoringValueByCpu added in v0.4.5

type VmMonitoringValueByCpu struct {
	CpuGuest       float64 `json:"cpu_guest"`
	CpuGuestNice   float64 `json:"cpu_guest_nice"`
	CpuHintr       float64 `json:"cpu_hintr"`
	CpuIdle        float64 `json:"cpu_idle"`
	CpuIowait      float64 `json:"cpu_iowait"`
	CpuNice        float64 `json:"cpu_nice"`
	CpuSintr       float64 `json:"cpu_sintr"`
	CpuSteal       float64 `json:"cpu_steal"`
	CpuSystem      float64 `json:"cpu_system"`
	CpuUser        float64 `json:"cpu_user"`
	CpuUtilization float64 `json:"cpu_utilization"`
	Time           string  `json:"time"`
}

type VmMonitoringValueByDisk added in v0.4.5

type VmMonitoringValueByDisk struct {
	Free        float64 `json:"free"`
	ReadBytes   float64 `json:"read_bytes"`
	ReadTime    float64 `json:"read_time"`
	Reads       float64 `json:"reads"`
	Total       float64 `json:"total"`
	Used        float64 `json:"used"`
	UsedPercent float64 `json:"used_percent"`
	WriteBytes  float64 `json:"write_bytes"`
	WriteTime   float64 `json:"write_time"`
	Writes      float64 `json:"writes"`
	Time        string  `json:"time"`
}

type VmMonitoringValueByMemory added in v0.4.5

type VmMonitoringValueByMemory struct {
	MemCached      float64 `json:"mem_cached"`
	MemFree        float64 `json:"mem_free"`
	MemShared      float64 `json:"mem_shared"`
	MemTotal       float64 `json:"mem_total"`
	MemUsed        float64 `json:"mem_used"`
	MemUtilization float64 `json:"mem_utilization"`
	Time           string  `json:"time"`
}

type VmMonitoringValueByNetwork added in v0.4.5

type VmMonitoringValueByNetwork struct {
	BytesIn  float64 `json:"bytes_in"`
	BytesOut float64 `json:"bytes_out"`
	PktsIn   float64 `json:"pkts_in"`
	PktsOut  float64 `json:"pkts_out"`
	Time     string  `json:"time"`
}

type VmMonitoringValueOnDemand

type VmMonitoringValueOnDemand struct {
	BytesIn  int `json:"bytes_in"`
	BytesOut int `json:"bytes_out"`
	PktsIn   int `json:"pkts_in"`
	PktsOut  int `json:"pkts_out"`
}

Jump to

Keyboard shortcuts

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