manager

package
v0.2.0-cappuccino Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Etcd     realtimestore.Storage
	InfluxDB metricstore.Storage
	// contains filtered or unexported fields
}

func NewAPIServer

func NewAPIServer(config Config, aggregator *collector.Aggregator, influxDB metricstore.Storage, etcd realtimestore.Storage, manager *CollectManager) (*APIServer, error)

API 서버 초기화

func (*APIServer) GetMCISMonInfo

func (apiServer *APIServer) GetMCISMonInfo(c echo.Context) error

멀티 클라우드 인프라 서비스 모니터링 정보 조회

func (*APIServer) GetMCISRealtimeMonInfo

func (apiServer *APIServer) GetMCISRealtimeMonInfo(c echo.Context) error

멀티 클라우드 인프라 서비스(MCIS) 실시간 모니터링 정보 조회

func (*APIServer) GetMonConfig

func (apiServer *APIServer) GetMonConfig(c echo.Context) error

모니터링 정책 조회

func (*APIServer) GetTelegrafConfFile

func (apiServer *APIServer) GetTelegrafConfFile(c echo.Context) error

Telegraf config 파일 다운로드

func (*APIServer) GetTelegrafInstallScript

func (apiServer *APIServer) GetTelegrafInstallScript(c echo.Context) error

Telegraf agent 설치 스크립트 파일 다운로드

func (*APIServer) GetTelegrafPkgFile

func (apiServer *APIServer) GetTelegrafPkgFile(c echo.Context) error

Telegraf package 파일 다운로드

func (*APIServer) GetVMMonInfo

func (apiServer *APIServer) GetVMMonInfo(c echo.Context) error

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

func (*APIServer) GetVMRealtimeMonInfo

func (apiServer *APIServer) GetVMRealtimeMonInfo(c echo.Context) error

멀티 클라우드 인프라 VM 실시간 모니터링 정보 조회

func (*APIServer) InstallTelegraf

func (apiServer *APIServer) InstallTelegraf(c echo.Context) error

func (*APIServer) ResetMonConfig

func (apiServer *APIServer) ResetMonConfig(c echo.Context) error

모니터링 정책 초기화

func (*APIServer) SetMonConfig

func (apiServer *APIServer) SetMonConfig(c echo.Context) error

모니터링 정책 설정

func (*APIServer) SetRoutingRule

func (apiServer *APIServer) SetRoutingRule(e *echo.Echo)

func (*APIServer) StartAPIServer

func (apiServer *APIServer) StartAPIServer(wg *sync.WaitGroup) error

모니터링 API 서버 실행

type CollectManager

type CollectManager struct {
	Config     Config
	InfluxdDB  metricstore.Storage
	Etcd       realtimestore.Storage
	Aggregator collector.Aggregator
	WaitGroup  *sync.WaitGroup
	UdpCOnn    *net.UDPConn

	CollectorIdx      []string
	CollectorUUIDAddr map[string]*collector.MetricCollector
	AggregatingChan   map[string]*chan string
	TransmitDataChan  map[string]*chan collector.TelegrafMetric
	AgentQueueTTL     map[string]time.Time
	AgentQueueColN    map[string]int
	// contains filtered or unexported fields
}

func NewCollectorManager

func NewCollectorManager() (*CollectManager, error)

콜렉터 매니저 초기화

func (*CollectManager) CreateCollector

func (manager *CollectManager) CreateCollector() error

func (*CollectManager) CreateLoadBalancer

func (manager *CollectManager) CreateLoadBalancer(wg *sync.WaitGroup) error

func (*CollectManager) FlushMonitoringData

func (manager *CollectManager) FlushMonitoringData() error

기존의 실시간 모니터링 데이터 삭제

func (*CollectManager) LoadConfiguration

func (manager *CollectManager) LoadConfiguration() error

config 파일 로드

func (*CollectManager) ManageAgentQueue

func (manager *CollectManager) ManageAgentQueue(hostId string, AgentQueueColN map[string]int, metric collector.TelegrafMetric) error

func (*CollectManager) ManageAgentTtl

func (manager *CollectManager) ManageAgentTtl(wg *sync.WaitGroup)

func (*CollectManager) SetConfigurationToETCD

func (manager *CollectManager) SetConfigurationToETCD() error

TODO: 모니터링 정책 설정

func (*CollectManager) StartAggregateScheduler

func (manager *CollectManager) StartAggregateScheduler(wg *sync.WaitGroup, c *map[string]*chan string)

func (*CollectManager) StartCollector

func (manager *CollectManager) StartCollector(wg *sync.WaitGroup) error

func (manager *CollectManager) StartCollector(wg *sync.WaitGroup, aggregateChan chan string) error {

func (*CollectManager) StartLoadBalancer

func (manager *CollectManager) StartLoadBalancer(udpConn net.PacketConn, wg *sync.WaitGroup)

func (*CollectManager) StartScaleScheduler

func (manager *CollectManager) StartScaleScheduler(wg *sync.WaitGroup)

콜렉터 스케일 인/아웃 관리 스케줄러

func (*CollectManager) StopCollector

func (manager *CollectManager) StopCollector(uuid string) error

type CollectorScheduler

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

func NewCollectorScheduler

func NewCollectorScheduler(cm *CollectManager) CollectorScheduler

func (CollectorScheduler) CheckScaleCondition

func (c CollectorScheduler) CheckScaleCondition() error

콜렉터 스케질 인/아웃 조건 체크

func (CollectorScheduler) ScaleIn

func (c CollectorScheduler) ScaleIn() error

func (CollectorScheduler) ScaleOut

func (c CollectorScheduler) ScaleOut(scaleCnt int) error

type Config

type Config struct {
	InfluxDB struct {
		EndpointUrl string `yaml:"endpoint_url"`
		Database    string `yaml:"database"`
		UserName    string `yaml:"user_name"`
		Password    string `yaml:"password"`
	} `yaml:"influxdb"`
	Etcd struct {
		EndpointUrl string `yaml:"endpoint_url"`
	} `yaml:"etcd"`
	CollectManager struct {
		CollectorIP   string `yaml:"collector_ip"`
		CollectorPort int    `yaml:"collector_port"`
		CollectorCnt  int    `yaml:"collector_count"`
	} `yaml:"collect_manager"`
	APIServer struct {
		Port int `yaml:"port"`
	} `yaml:"api_server"`
	Monitoring struct {
		AgentTtl          int `yaml:"agent_TTL"`
		AgentInterval     int `yaml:"agent_interval"`
		CollectorInterval int `yaml:"collector_interval"`
		ScheduleInterval  int `yaml:"schedule_interval"`
		MaxHostCount      int `yaml:"max_host_count"`
	} `yaml:"monitoring"`
}

type MonConfig

type MonConfig struct {
	AgentTtl           int `json:"agent_TTL"`          // 모니터링 에이전트 info TTL
	AgentInterval      int `json:"agent_interval"`     // 모니터링 에이전트 수집주기
	CollectorInterval  int `json:"collector_interval"` // 모니터링 콜렉터 Aggregate 주기
	SchedulingInterval int `json:"schedule_interval"`  // 모니터링 콜렉터 스케줄링 주기 (스케일 인/아웃 로직 체크 주기)
	MaxHostCount       int `json:"max_host_count"`     // 모니터링 콜렉터 수
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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