crowdsecurity/crowdsec · error
plugin %q: config not found
Error message
plugin %q: config not found
What it means
tryNotify looks up the plugin's PluginConfig by name before sending a notification; if the name is absent from pluginConfigByName it returns "plugin %q: config not found". The broker is asked to notify a plugin it has no loaded config for. This typically happens through dispatch from Run for a plugin registered late or referenced after a config reload.
Source
Thrown at pkg/csplugin/broker.go:379
if err != nil {
return nil, err
}
raw, err := client.Dispense(name)
if err != nil {
return nil, err
}
pb.pluginKillMethods = append(pb.pluginKillMethods, c.Kill)
return raw.(protobufs.NotifierServer), nil
}
func (pb *PluginBroker) tryNotify(ctx context.Context, pluginName, message string) error {
// config guard
pc, ok := pb.pluginConfigByName[pluginName]
if !ok {
return fmt.Errorf("plugin %q: config not found", pluginName)
}
timeout := pc.TimeOut
ctxTimeout, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
// plugin guard
plugin, ok := pb.notificationPluginByName[pluginName]
if !ok || plugin == nil {
return fmt.Errorf("plugin %q: notifier not registered", pluginName)
}
_, err := plugin.Notify(
ctxTimeout,
&protobufs.Notification{
Text: message,
Name: pluginName,View on GitHub (pinned to 909b515798)
Solutions
- Confirm a notification yaml with that exact `name:` exists and parsed successfully at startup.
- Restart crowdsec after adding/renaming notification configs.
- Align the notification name used in profiles.yaml with the yaml `name:` field.
- Check for earlier loadConfig warnings ('is defined multiple times') that may indicate the wrong config won.
Example fix
// before: dispatch to name with no config notifications: - slak_default # typo // after notifications: - slack_default
Defensive patterns
Strategy: validation
Validate before calling
// before dispatching
if _, ok := broker.pluginConfigByName[name]; !ok {
log.Warnf("skipping notification to unconfigured plugin %s", name)
return nil
} Try / catch
if err := broker.tryNotify(ctx, name, msg); err != nil {
if strings.Contains(err.Error(), "config not found") {
log.Warnf("plugin %s no longer configured; skipping", name)
return nil
}
return err
} Prevention
- Restart crowdsec after any change to the notifications directory.
- Avoid renaming notification configs in place; add new, switch profiles, then remove old.
- Log a warning in dispatch paths when a plugin name is unknown instead of failing hard.
When it happens
Trigger: tryNotify invoked (via pushNotificationsToPlugin/Run dispatch) with a pluginName that has no entry in pluginConfigByName — e.g. notification was removed from the notification dir while crowdsec runs, or a profile change referencing an unconfigured plugin.
Common situations: Runtime reload removed/renamed a notification config while old alerts still reference it; name mismatch between profile and notification yaml; notifications dir edited without restarting crowdsec.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- loading config: %w
- plugin %q: notifier not registered
- while getting process attributes: both plugin user and group
- plugin broker: %w
- loading plugin: %w
AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06).
Data as JSON: /api/errors/a19603b4ba1f37ff.
Report an issue: GitHub.