func (c *NetworkCheck) Configure(rawInstance integration.Data, rawInitConfig integration.Data, source string) error {
	err := c.CommonConfigure(rawInstance, source)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(rawInitConfig, &c.config.initConf)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(rawInstance, &c.config.instance)
	if err != nil {
		return err
	}

	if c.config.instance.ExcludedInterfaceRe != "" {
		pattern, err := regexp.Compile(c.config.instance.ExcludedInterfaceRe)
		if err != nil {
			log.Errorf("Failed to parse network check option excluded_interface_re: %s", err)
		} else {
			c.config.instance.ExcludedInterfacePattern = pattern
		}
	}

	return nil
}
// Configure configures the network checks
Configure configures the network checks
// Configure configures the network checks
func (c *NetworkCheck) Configure(rawInstance integration.Data, rawInitConfig integration.Data, source string) error {
	err := c.CommonConfigure(rawInstance, source)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(rawInitConfig, &c.config.initConf)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(rawInstance, &c.config.instance)
	if err != nil {
		return err
	}
	if c.config.instance.ExcludedInterfaceRe != "" {
		pattern, err := regexp.Compile(c.config.instance.ExcludedInterfaceRe)
		if err != nil {
			log.Errorf("Failed to parse network check option excluded_interface_re: %s", err)
		} else {
			c.config.instance.ExcludedInterfacePattern = pattern
		}
	}
	return nil
}
func ( c * NetworkCheck ) Configure ( rawInstance integration . Data , rawInitConfig integration . Data , source string ) error { err := c . CommonConfigure ( rawInstance , source ) if err != nil { return err } err = yaml . Unmarshal ( rawInitConfig , & c . config . initConf ) if err != nil { return err } err = yaml . Unmarshal ( rawInstance , & c . config . instance ) if err != nil { return err } if c . config . instance . ExcludedInterfaceRe != " " { pattern , err := regexp . Compile ( c . config . instance . ExcludedInterfaceRe ) if err != nil { log . Errorf ( " " , err ) } else { c . config . instance . ExcludedInterfacePattern = pattern } } return nil }
Configure configures the network checks
Configure configures the network checks