{"record":{"id":"a19603b4ba1f37ff","repo":"crowdsecurity/crowdsec","slug":"plugin-q-config-not-found","errorCode":null,"errorMessage":"plugin %q: config not found","messagePattern":"plugin %q: config not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/csplugin/broker.go","lineNumber":379,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\traw, err := client.Dispense(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpb.pluginKillMethods = append(pb.pluginKillMethods, c.Kill)\n\n\treturn raw.(protobufs.NotifierServer), nil\n}\n\nfunc (pb *PluginBroker) tryNotify(ctx context.Context, pluginName, message string) error {\n\t// config guard\n\tpc, ok := pb.pluginConfigByName[pluginName]\n\tif !ok {\n\t\treturn fmt.Errorf(\"plugin %q: config not found\", pluginName)\n\t}\n\n\ttimeout := pc.TimeOut\n\tctxTimeout, cancel := context.WithTimeout(ctx, timeout)\n\n\tdefer cancel()\n\n\t// plugin guard\n\tplugin, ok := pb.notificationPluginByName[pluginName]\n\tif !ok || plugin == nil {\n\t\treturn fmt.Errorf(\"plugin %q: notifier not registered\", pluginName)\n\t}\n\n\t_, err := plugin.Notify(\n\t\tctxTimeout,\n\t\t&protobufs.Notification{\n\t\t\tText: message,\n\t\t\tName: pluginName,","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/csplugin/broker.go#L361-L397","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: dispatch to name with no config\nnotifications:\n  - slak_default   # typo\n// after\nnotifications:\n  - slack_default","handlingStrategy":"validation","validationCode":"// before dispatching\nif _, ok := broker.pluginConfigByName[name]; !ok {\n    log.Warnf(\"skipping notification to unconfigured plugin %s\", name)\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err := broker.tryNotify(ctx, name, msg); err != nil {\n    if strings.Contains(err.Error(), \"config not found\") {\n        log.Warnf(\"plugin %s no longer configured; skipping\", name)\n        return nil\n    }\n    return err\n}","preventionTips":["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."],"tags":["notifications","plugins","config","runtime"],"backgroundTag":"record-not-found","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}