metrics

package
v0.0.0-...-028f1de Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// event id
	EVENT_CHANNEL_FAILED                     MetricsEventID = "agent.channel.failed"
	EVENT_CHANNEL_SWITCH                     MetricsEventID = "agent.channel.switch"
	EVENT_UPDATE_FAILED                      MetricsEventID = "agent.update.failed"
	EVENT_TASK_FAILED                        MetricsEventID = "agent.task.failed"
	EVENT_TASK_WARN                          MetricsEventID = "agent.task.warn"
	EVENT_HYBRID_REGISTER                    MetricsEventID = "agent.hybrid.register"
	EVENT_HYBRID_UNREGISTER                  MetricsEventID = "agent.hybrid.unregister"
	EVENT_SESSION_FAILED                     MetricsEventID = "agent.session.failed"
	EVENT_PERF_CPU_OVERLOAD                  MetricsEventID = "agent.pref.cup.overload"
	EVENT_PERF_MEM_OVERLOAD                  MetricsEventID = "agent.pref.mem.overload"
	EVENT_PERF_SAMPLE                        MetricsEventID = "agent.pref.sample"
	EVENT_BASE_STARTUP                       MetricsEventID = "agent.startup"
	EVENT_BASE_SHUTDOWN_FAILED               MetricsEventID = "agent.shutdown.failed"
	EVENT_BASE_VIRTIO                        MetricsEventID = "agent.virtio"
	EVENT_KDUMP                              MetricsEventID = "agent.kdump"
	EVENT_PLUGIN_EXECUTE                     MetricsEventID = "agent.plugin.execute"
	EVENT_PLUGIN_LOCALLIST                   MetricsEventID = "agent.plugin.locallist"
	EVENT_PLUGIN_UPDATE                      MetricsEventID = "agent.plugin.update"
	EVENT_LINUX_GUESTOS_PANIC                MetricsEventID = "Linux-GuestOS-Panic"
	EVENT_WINDOWS_WER_SYSTEM_ERRORRE_PORTING MetricsEventID = "Microsoft-Windows-WER-SystemErrorReporting"
	EVENT_AGENT_LAST_PANIC                   MetricsEventID = "agent.last.panic"

	// event category
	EVENT_CATEGORY_CHANNEL  EventCategory = "CHANNEL"
	EVENT_CATEGORY_UPDATE   EventCategory = "UPDATE"
	EVENT_CATEGORY_TASK     EventCategory = "TASK"
	EVENT_CATEGORY_HYBRID   EventCategory = "HYBRID"
	EVENT_CATEGORY_SESSION  EventCategory = "SESSION"
	EVENT_CATEGORY_PERF     EventCategory = "PERF"
	EVENT_CATEGORY_STARTUP  EventCategory = "STARTUP"
	EVENT_CATEGORY_SHUTDOWN EventCategory = "SHUTDOWN"
	EVENT_CATEGORY_VIRTIO   EventCategory = "VIRTIO"
	EVENT_CATEGORY_KDUMP    EventCategory = "KDUMP"
	EVENT_CATEGORY_PLUGIN   EventCategory = "PLUGIN"
	EVENT_CATEGORY_PANIC    EventCategory = "PANIC"

	// event subcategory
	EVENT_SUBCATEGORY_CHANNEL_GSHELL    EventSubCategory = "gshell"
	EVENT_SUBCATEGORY_CHANNEL_WS        EventSubCategory = "ws"
	EVENT_SUBCATEGORY_CHANNEL_MGR       EventSubCategory = "channelmgr"
	EVENT_SUBCATEGORY_HYBRID_REGISTER   EventSubCategory = "register"
	EVENT_SUBCATEGORY_HYBRID_UNREGISTER EventSubCategory = "unregister"
	EVENT_SUBCATEGORY_PERF_CPU          EventSubCategory = "cpu"
	EVENT_SUBCATEGORY_PERF_MEM          EventSubCategory = "mem"
	EVENT_SUBCATEGORY_GOESTOS           EventSubCategory = "guestos"

	// event level
	EVENT_LEVEL_ERROR EventLevel = "ERROR"
	EVENT_LEVEL_WARN  EventLevel = "WARN"
	EVENT_LEVEL_INFO  EventLevel = "INFO"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonInfo

type CommonInfo struct {
	Arch          string `json:"arch"`
	InstanceId    string `json:"instanceId"`
	OsVersion     string `json:"osVersion"`
	VirtualType   string `json:"virtualType"`
	Distribution  string `json:"distribution"`
	KernelVersion string `json:"kernelVersion"`
}

type EventCategory

type EventCategory string

type EventLevel

type EventLevel string

type EventSubCategory

type EventSubCategory string

type MetricsEvent

type MetricsEvent struct {
	EventId     MetricsEventID   `json:"eventId"`
	Category    EventCategory    `json:"category"`
	SubCategory EventSubCategory `json:"subCategory"`
	EventLevel  EventLevel       `json:"eventLevel"`
	EventTime   int64            `json:"eventTime"`
	Common      string           `json:"common"`
	KeyWords    string           `json:"keywords"`
}

func GetAgentLastPanicEvent

func GetAgentLastPanicEvent(keywords ...string) *MetricsEvent

func GetBaseStartupEvent

func GetBaseStartupEvent(keywords ...string) *MetricsEvent

基础事件

func GetChannelFailEvent

func GetChannelFailEvent(subCategory EventSubCategory, keywords ...string) *MetricsEvent

通道系统

func GetChannelSwitchEvent

func GetChannelSwitchEvent(keywords ...string) *MetricsEvent

func GetCpuOverloadEvent

func GetCpuOverloadEvent(keywords ...string) *MetricsEvent

性能上报

func GetHybridRegisterEvent

func GetHybridRegisterEvent(success bool, keywords ...string) *MetricsEvent

混合云系统

func GetHybridUnregisterEvent

func GetHybridUnregisterEvent(success bool, keywords ...string) *MetricsEvent

func GetKdumpServiceStatusEvent

func GetKdumpServiceStatusEvent(keywords ...string) *MetricsEvent

ecs_dump服务状态上报

func GetLinuxGuestOSPanicEvent

func GetLinuxGuestOSPanicEvent(keywords ...string) *MetricsEvent

func GetMemOverloadEvent

func GetMemOverloadEvent(keywords ...string) *MetricsEvent

func GetPerfSampleEvent

func GetPerfSampleEvent(keywords ...string) *MetricsEvent

func GetPluginExecuteEvent

func GetPluginExecuteEvent(keywords ...string) *MetricsEvent

func GetPluginLocalListEvent

func GetPluginLocalListEvent(keywords ...string) *MetricsEvent

func GetPluginUpdateEvent

func GetPluginUpdateEvent(keywords ...string) *MetricsEvent

func GetSessionFailedEvent

func GetSessionFailedEvent(keywords ...string) *MetricsEvent

session manager系统

func GetShutDownFailedEvent

func GetShutDownFailedEvent(keywords ...string) *MetricsEvent

func GetTaskFailedEvent

func GetTaskFailedEvent(keywords ...string) *MetricsEvent

task系统

func GetTaskWarnEvent

func GetTaskWarnEvent(keywords ...string) *MetricsEvent

func GetUpdateFailedEvent

func GetUpdateFailedEvent(keywords ...string) *MetricsEvent

升级系统

func GetVirtioVersionEvent

func GetVirtioVersionEvent(keywords ...string) *MetricsEvent

func GetWindowsGuestOSPanicEvent

func GetWindowsGuestOSPanicEvent(keywords ...string) *MetricsEvent

func (*MetricsEvent) ReportEvent

func (m *MetricsEvent) ReportEvent()

func (*MetricsEvent) ReportEventSync

func (m *MetricsEvent) ReportEventSync()

同步上报事件,acs-plugin-manager上报时使用该方法

type MetricsEventID

type MetricsEventID string

type ReportBuff

type ReportBuff struct {
	ReportChan chan string
}

作为延迟上报的缓冲区

Jump to

Keyboard shortcuts

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