Anyone know how to setup Notifications in a Multiserver Architecture?
Let's say I have Machine A on which my LAPI is running.
I have Machine B registered to the LAPI on Machine A. Machine B has its own parser and scenario that are able to detect and trigger bans.
I want to sent a slack notification whenever a ban is triggered through the scenario of Machine B. Where do I have to configure the slack plugin and the profile.yaml?
On Machine B oder or Machine A?
I was already able to setup a test scenario on Machine A where messages are correctly sent slack to a custom slack channel with its own webhook. But the plugin and scenario are available on Machine A.
I want to achieve the same with the scenario of remote Machine B.
Test Executions on Machine A with LAPI with "cscli notification test ..." return following message:
6 Replies
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type
/unresolve
© Created By WhyAydan for CrowdSec ❤️
I tried changing the type to http and testing connectivity with a simple json payload and it worked.
When I change the json payload to the following from the documentation: https://docs.crowdsec.net/docs/notification_plugins/http
Then I receive errors again
HTTP Plugin | CrowdSec
The HTTP plugin is by default shipped with your CrowdSec installation. The following guide shows how to enable it.
I want to sent a slack notification whenever a ban is triggered through the scenario of Machine B. Where do I have to configure the slack plugin and the profile.yaml? On Machine B oder or Machine A?LAPI is the process that manages plugins, so you would only need to configure on machines A. and why you changing the format to a json payload it has to be altered to whatever application you are sending it too. so if slack expects
{"text": ""}
doing a {{ . | toJson}}
doesn't know you need a text attribute 😕
cause even though you name it slack
its the http
plugin so why not configure the slack
plugin which the format
is sent as the message body.Slack Plugin | CrowdSec
The slack plugin is by default shipped with your CrowdSec installation. The following guide shows how to enable it.
Just for testing purposes. I needed a simple way to see if maybe my webhook url was wrong or something else was the matter.
And if in case I saw using http plugin would be easier, then I would have completely switched to http plugin. Would then be only a matter of how to include those Alert Values inbetween the string that is being sent via the json object.
But I found my issue now. When I copied the messag template, for some reason the parts that weren't directly visible on the screen weren't copied as well. Therefore the template was incomplete and the issue arised. Dumb on my part. Sorry for the inconvience.
Resolving Anyone know how to setup Notifications in a Multiserver Architecture?
This has now been resolved. If you think this is a mistake please run
/unresolve