When running “go build” I encounter the error below.
I have installed dependencies using “go tidy” and copy and pasted all commands in the documentation: Writing Plugin in Go | CrowdSec
Any solution for this?
Thanks!
When running “go build” I encounter the error below.
I have installed dependencies using “go tidy” and copy and pasted all commands in the documentation: Writing Plugin in Go | CrowdSec
Any solution for this?
Thanks!
@vdmamaril06 There was a mistake in docs which caused this. I have made PR to fix it.
You can fix this by changing the Notifier interface to
type Notifier interface {
Configure(ctx context.Context, config *protobufs.Config) (*protobufs.Empty, error)
Notify(ctx context.Context, notification *protobufs.Notification) (*protobufs.Empty, error)
}
Also there’s a more complete version of the plugin at crowdsec/plugins/notifications/email at add_email_plugin · sbs2001/crowdsec · GitHub . It will be built in crowdsec soon.
Thanks @sbs2001. I was able to build the email plugin however I am unable to start crowdsec when it is in the plugins folder. What could I be missing?
@vdmamaril06 could you paste the logs from /var/log/crowdsec.log ? So we could understand what’s happening.
My guess is that this was caused because the plugin binary needs to be pasted in the /usr/local/lib/crowdsec/plugins/ instead of /var/lib/crowdsec/plugins/ . We would be updating the docs very soon after merging Add email notification plugin. by sbs2001 · Pull Request #1013 · crowdsecurity/crowdsec · GitHub .