crowdsecurity/crowdsec · error

config file for plugin %s not found

Error message

config file for plugin %s not found

What it means

verifyPluginConfigsWithProfile checks that every notification named in profiles.yaml has a corresponding config file in the notification dir. If a profile references a plugin name that has no pluginConfigByName entry, this error aborts loadConfig. It is a cross-file consistency check between profiles and notification configs.

Source

Thrown at pkg/csplugin/broker.go:256

				log.Warningf("notification '%s' is defined multiple times", pluginConfig.Name)
			}

			pb.pluginConfigByName[pluginConfig.Name] = pluginConfig
			if !pb.profilesContainPlugin(pluginConfig.Name) {
				continue
			}
		}
	}

	return pb.verifyPluginConfigsWithProfile()
}

// checks whether every notification in profile has its own config file
func (pb *PluginBroker) verifyPluginConfigsWithProfile() error {
	for _, profileCfg := range pb.profileConfigs {
		for _, pluginName := range profileCfg.Notifications {
			if _, ok := pb.pluginConfigByName[pluginName]; !ok {
				return fmt.Errorf("config file for plugin %s not found", pluginName)
			}

			pb.pluginsTypesToDispatch[pb.pluginConfigByName[pluginName].Type] = struct{}{}
		}
	}

	return nil
}

// check whether each plugin in profile has its own binary
func (pb *PluginBroker) verifyPluginBinaryWithProfile() error {
	for _, profileCfg := range pb.profileConfigs {
		for _, pluginName := range profileCfg.Notifications {
			if _, ok := pb.notificationPluginByName[pluginName]; !ok {
				return fmt.Errorf("binary for plugin %s not found", pluginName)
			}
		}
	}

View on GitHub (pinned to 909b515798)

Solutions

  1. Ensure names match exactly: profile.yaml `notifications:` entries must equal the `name:` field in a notification yaml.
  2. Install missing notification configs (cscli hub update && cscli hub install notification-*).
  3. Check the config file loaded without error — a parse failure (802) also leaves the name unregistered.
  4. Remove the notification from profiles.yaml if you do not actually use it.

Example fix

// before: profiles.yaml references missing notification
notifications:
  - slack_default   # no notifications/slack_default.yaml
// after: install slack config or fix the name to match an existing yaml
Defensive patterns

Strategy: validation

Validate before calling

// cross-check profile notifications against loaded configs
for _, n := range profileNotifications {
    if _, ok := loadedConfigs[n]; !ok {
        log.Warnf("profile notification %s has no config file", n)
    }
}

Try / catch

if err := broker.Init(ctx, cfg); err != nil {
    if strings.Contains(err.Error(), "config file for plugin") {
        // extract plugin name, check notifications/ dir for matching yaml
    }
    return err
}

Prevention

When it happens

Trigger: PluginBroker.Init -> loadConfig, after loading notification configs: a profile lists a notification (e.g. email_default) whose yaml is absent, misnamed, or failed to parse and was skipped.

Common situations: Enabled a notification in /etc/crowdsec/profiles.yaml but never created its config under notifications/; typo between profile notification name and the yaml `name:` field; notification config file not installed (hub notifications not installed).

Understand the failure class

Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.

Related errors


AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06). Data as JSON: /api/errors/9e49f5a6c9c055ca. Report an issue: GitHub.