Hello,
I have a gotify http notification configuration that works. The name of the notification is gotify but it’s in fact a http notification.
# cscli notifications test gotify
DEBU[0000] starting plugin args="[/usr/lib/crowdsec/plugins/notification-http]" path=/usr/lib/crowdsec/plugins/notification-http
DEBU[0000] plugin started path=/usr/lib/crowdsec/plugins/notification-http pid=26626
DEBU[0000] waiting for RPC address path=/usr/lib/crowdsec/plugins/notification-http
DEBU[0000] using plugin version=1
TRAC[0000] waiting for stdio data
INFO registered plugin gotify
INFO registered plugin http_default
INFO pluginTomb dying
INFO[0000] received signal for gotify config @module=http-plugin
INFO killing all plugins
DEBU[0000] received EOF, stopping recv loop err="rpc error: code = Unavailable desc = error reading from server: EOF"
INFO[0000] plugin process exited path=/usr/lib/crowdsec/plugins/notification-http pid=26626
DEBU[0000] plugin exited
After the test, I have a notification in gotify. So the test is a success.
The notification is enabled in the profile.
# cat profiles.yaml
name: alert_on_remediation
filters:
- Alert.Remediation == true
notifications:
- gotify
---
name: default_ip_remediation
#debug: true
filters:
- Alert.Remediation == true && Alert.GetScope() == "Ip"
decisions:
- type: ban
duration: 4h
#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
notifications:
# - slack_default # Set the webhook in /etc/crowdsec/notifications/slack.yaml before enabling this.
# - splunk_default # Set the splunk url and token in /etc/crowdsec/notifications/splunk.yaml before enabling this.
# - http_default # Set the required http parameters in /etc/crowdsec/notifications/http.yaml before enabling this.
# - email_default # Set the required email parameters in /etc/crowdsec/notifications/email.yaml before enabling this.
on_success: break
---
name: default_range_remediation
#debug: true
filters:
- Alert.Remediation == true && Alert.GetScope() == "Range"
decisions:
- type: ban
duration: 4h
#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
# notifications:
# - slack_default # Set the webhook in /etc/crowdsec/notifications/slack.yaml before enabling this.
# - splunk_default # Set the splunk url and token in /etc/crowdsec/notifications/splunk.yaml before enabling this.
# - http_default # Set the required http parameters in /etc/crowdsec/notifications/http.yaml before enabling this.
# - email_default # Set the required email parameters in /etc/crowdsec/notifications/email.yaml before enabling this.
on_success: break
But then, I have an actual alert in the I don’t have the notification. The log is like this:
time="2025-03-22T11:59:52+01:00" level=info msg="(XXX/crowdsec) crowdsecurity/http-probing by ip 172.105.246.139 (DE/63949) : 4h ban on Ip 172.105.246.139"
time="2025-03-22T11:59:52+01:00" level=info msg="Signal push: 1 signals to push"
time="2025-03-22T11:59:52+01:00" level=info msg="received signal for gotify config" @module=http-plugin
time="2025-03-22T11:59:52+01:00" level=warning msg="HTTP server returned non 200 status code: 400" @module=http-plugin
time="2025-03-22T11:59:55+01:00" level=info msg="Ip 172.105.246.139 performed 'crowdsecurity/http-admin-interface-probing' (5 events over 2.473874922s) at 2025-03-22 10:59:55.664462426 +0000 UTC"
time="2025-03-22T11:59:55+01:00" level=warning msg="Cannot send alert to Plugin channel (try: 0)"
So I have this "HTTP server returned non 200 status code: 400" @module=http-plugin
that seems to be the problem while I have no such things when testing. Any idea?