Documentation ¶
Index ¶
- Constants
- func Init()
- func Start()
- func Stop()
- type SGuestMonitor
- func (m *SGuestMonitor) Cpu() jsonutils.JSONObject
- func (m *SGuestMonitor) Diskio() jsonutils.JSONObject
- func (m *SGuestMonitor) Mem() jsonutils.JSONObject
- func (m *SGuestMonitor) Netio() jsonutils.JSONObject
- func (m *SGuestMonitor) UpdateCpuCount(vcpuCount int)
- func (m *SGuestMonitor) UpdateNicsDesc(nics []*desc.SGuestNetwork)
- func (m *SGuestMonitor) UpdateVmName(name string)
- type SGuestMonitorCollector
- type SHostMetricsCollector
Constants ¶
View Source
const ( TelegrafServer = "http://127.0.0.1:8087/write" MeasurementsPrefix = "vm_" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SGuestMonitor ¶
type SGuestMonitor struct { Name string Id string Pid int Nics []*desc.SGuestNetwork CpuCnt int Ip string Process *process.Process ScalingGroupId string Tenant string TenantId string DomainId string ProjectDomain string }
func NewGuestMonitor ¶
func NewGuestMonitor(name, id string, pid int, nics []*desc.SGuestNetwork, cpuCount int, ) (*SGuestMonitor, error)
func (*SGuestMonitor) Cpu ¶
func (m *SGuestMonitor) Cpu() jsonutils.JSONObject
func (*SGuestMonitor) Diskio ¶
func (m *SGuestMonitor) Diskio() jsonutils.JSONObject
func (*SGuestMonitor) Mem ¶
func (m *SGuestMonitor) Mem() jsonutils.JSONObject
func (*SGuestMonitor) Netio ¶
func (m *SGuestMonitor) Netio() jsonutils.JSONObject
func (*SGuestMonitor) UpdateCpuCount ¶
func (m *SGuestMonitor) UpdateCpuCount(vcpuCount int)
func (*SGuestMonitor) UpdateNicsDesc ¶
func (m *SGuestMonitor) UpdateNicsDesc(nics []*desc.SGuestNetwork)
func (*SGuestMonitor) UpdateVmName ¶
func (m *SGuestMonitor) UpdateVmName(name string)
type SGuestMonitorCollector ¶
type SGuestMonitorCollector struct {
// contains filtered or unexported fields
}
func NewGuestMonitorCollector ¶
func NewGuestMonitorCollector() *SGuestMonitorCollector
func (*SGuestMonitorCollector) CollectReportData ¶
func (s *SGuestMonitorCollector) CollectReportData() (ret string)
func (*SGuestMonitorCollector) GetGuests ¶
func (s *SGuestMonitorCollector) GetGuests() map[string]*SGuestMonitor
func (*SGuestMonitorCollector) GetIoFiledName ¶
func (s *SGuestMonitorCollector) GetIoFiledName(field string) string
type SHostMetricsCollector ¶
type SHostMetricsCollector struct { ReportInterval int // seconds LastCollectTime time.Time // contains filtered or unexported fields }
func NewHostMetricsCollector ¶
func NewHostMetricsCollector() *SHostMetricsCollector
func (*SHostMetricsCollector) Start ¶
func (m *SHostMetricsCollector) Start()
func (*SHostMetricsCollector) Stop ¶
func (m *SHostMetricsCollector) Stop()
Click to show internal directories.
Click to hide internal directories.