func (m *Monitor) Start() error {
	// start probes
	for _, p := range m.Probes {
		if err := p.Start(); err != nil {
			baseLogger.Errorf("couldn't start probe \"%s\": %v", p.Name, err)
			return err
		}
	}
	if m.SnapshotFunc != nil {
		if err := m.SnapshotFunc(m); err != nil {
			baseLogger.Errorf(
				"coudln't execute snapshot function \"%s\": %v",
				m.Name,
				err,
			)
		}
	}
	baseLogger.Debugf("%s monitor has %d probe(s) running", m.GetName(), m.enabledProbeCount())
	return nil
}
// Start - Starts the monitor
Starts the monitor
// Start - Starts the monitor
func (m *Monitor) Start() error {
	for _, p := range m.Probes {
		if err := p.Start(); err != nil {
			baseLogger.Errorf("couldn't start probe \"%s\": %v", p.Name, err)
			return err
		}
	}
	if m.SnapshotFunc != nil {
		if err := m.SnapshotFunc(m); err != nil {
			baseLogger.Errorf(
				"coudln't execute snapshot function \"%s\": %v",
				m.Name,
				err,
			)
		}
	}
	baseLogger.Debugf("%s monitor has %d probe(s) running", m.GetName(), m.enabledProbeCount())
	return nil
}
func ( m * Monitor ) Start ( ) error { for _ , p := range m . Probes { if err := p . Start ( ) ; err != nil { baseLogger . Errorf ( " \" \" " , p . Name , err ) return err } } if m . SnapshotFunc != nil { if err := m . SnapshotFunc ( m ) ; err != nil { baseLogger . Errorf ( " \" \" " , m . Name , err , ) } } baseLogger . Debugf ( " " , m . GetName ( ) , m . enabledProbeCount ( ) ) return nil }
Starts the monitor
Starts the monitor
// start probes