Documentation ¶
Overview ¶
Package resourcemonitor AOS Core Monitoring Component
Index ¶
- Constants
- type AlertSender
- type Config
- type MonitoringSender
- type PartitionConfig
- type PartitionParam
- type ResourceMonitor
- func (monitor *ResourceMonitor) Close()
- func (monitor *ResourceMonitor) GetSystemInfo() cloudprotocol.SystemInfo
- func (monitor *ResourceMonitor) StartInstanceMonitor(instanceID string, monitoringConfig ResourceMonitorParams) error
- func (monitor *ResourceMonitor) StopInstanceMonitor(instanceID string) error
- type ResourceMonitorParams
- type SystemUsageProvider
- type TrafficMonitoring
Constants ¶
View Source
const ( MinutePeriod = iota HourPeriod DayPeriod MonthPeriod YearPeriod )
Service status.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertSender ¶
type AlertSender interface {
SendAlert(alert cloudprotocol.AlertItem)
}
AlertSender interface to send resource alerts.
type Config ¶
type Config struct { aostypes.AlertRules SendPeriod aostypes.Duration `json:"sendPeriod"` PollPeriod aostypes.Duration `json:"pollPeriod"` Partitions []PartitionConfig `json:"partitions"` Source string `json:"source"` }
Config configuration for resource monitoring.
type MonitoringSender ¶
type MonitoringSender interface {
SendMonitoringData(monitoringData cloudprotocol.NodeMonitoringData)
}
MonitoringSender sends monitoring data.
type PartitionConfig ¶
type PartitionConfig struct { Name string `json:"name"` Types []string `json:"types"` Path string `json:"path"` }
PartitionConfig partition information.
type PartitionParam ¶
PartitionParam partition instance information.
type ResourceMonitor ¶
ResourceMonitor instance.
func New ¶
func New( nodeID string, config Config, alertsSender AlertSender, monitoringSender MonitoringSender, trafficMonitoring TrafficMonitoring) ( monitor *ResourceMonitor, err error, )
New creates new resource monitor instance.
func (*ResourceMonitor) Close ¶
func (monitor *ResourceMonitor) Close()
Close closes monitor instance.
func (*ResourceMonitor) GetSystemInfo ¶
func (monitor *ResourceMonitor) GetSystemInfo() cloudprotocol.SystemInfo
func (*ResourceMonitor) StartInstanceMonitor ¶
func (monitor *ResourceMonitor) StartInstanceMonitor( instanceID string, monitoringConfig ResourceMonitorParams, ) error
StartInstanceMonitor starts monitoring service.
func (*ResourceMonitor) StopInstanceMonitor ¶
func (monitor *ResourceMonitor) StopInstanceMonitor(instanceID string) error
StopInstanceMonitor stops monitoring service.
type ResourceMonitorParams ¶
type ResourceMonitorParams struct { aostypes.InstanceIdent UID int GID int AlertRules *aostypes.AlertRules Partitions []PartitionParam }
ResourceMonitorParams instance resource monitor parameters.
type SystemUsageProvider ¶
Click to show internal directories.
Click to hide internal directories.