selfmon

package
v0.0.0-...-2987df4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger set log output

Types

type SelfMon

type SelfMon struct {
	Influx *output.InfluxDB
	OutDBs map[string]*output.InfluxDB //needed to get statistics

	TagMap map[string]string

	RtMeasName  string //devices measurement name
	GvmMeasName string //Self agent GoVirtualMachine measurement name
	OutMeasName string //Output DB's measurement name
	// contains filtered or unexported fields
}

SelfMon configuration for self monitoring

func NewNotInit

func NewNotInit(c *config.SelfMonConfig) *SelfMon

NewNotInit create strut without initialization

func (*SelfMon) AddDeviceMetrics

func (sm *SelfMon) AddDeviceMetrics(deviceid string, fields map[string]interface{}, devtags map[string]string)

AddDeviceMetrics add data from devices

func (*SelfMon) CheckAndSetInitialized

func (sm *SelfMon) CheckAndSetInitialized() bool

CheckAndSetInitialized set

func (*SelfMon) CheckAndUnSetInitialized

func (sm *SelfMon) CheckAndUnSetInitialized() bool

CheckAndUnSetInitialized unset

func (*SelfMon) End

func (sm *SelfMon) End()

End Release the SelMon Object

func (*SelfMon) Init

func (sm *SelfMon) Init()

Init Initialize the Object data and check for consistence

func (*SelfMon) IsInitialized

func (sm *SelfMon) IsInitialized() bool

IsInitialized check if this thread is already working

func (*SelfMon) SetOutDB

func (sm *SelfMon) SetOutDB(odb map[string]*output.InfluxDB)

SetOutDB set the output devices for query its statistics

func (*SelfMon) SetOutput

func (sm *SelfMon) SetOutput(val *output.InfluxDB)

SetOutput set out data

func (*SelfMon) StartGather

func (sm *SelfMon) StartGather(wg *sync.WaitGroup)

StartGather for stopping selfmonitori goroutine

func (*SelfMon) StopGather

func (sm *SelfMon) StopGather()

StopGather for stopping selfmonitori goroutine

Jump to

Keyboard shortcuts

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