-
-
Save baudneo/e363f9e47346cbe4b2823d7d80af54ac to your computer and use it in GitHub Desktop.
ntfy crowdsec notification example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/crowdsec/notifications/ntfy.yaml | |
type: http # Don't change | |
name: ntfy # Must match the registered plugin in the profile | |
# One of "trace", "debug", "info", "warn", "error", "off" | |
log_level: trace | |
# group_wait: # Time to wait collecting alerts before relaying a message to this plugin, eg "30s" | |
# group_threshold: # Amount of alerts that triggers a message before <group_wait> has expired, eg "10" | |
# max_retry: # Number of attempts to relay messages to plugins in case of error | |
# timeout: # Time to wait for response from the plugin before considering the attempt a failure, eg "10s" | |
#------------------------- | |
# plugin-specific options | |
# The following template receives a list of models.Alert objects | |
# The output goes in the http request body | |
format: | | |
{{range . -}}{{$alert := . -}}{{range .Decisions -}}{{.Value}} will get {{.Type}} for next {{.Duration}} for triggering {{.Scenario}} | |
https://www.shodan.io/host/{{.Value}} | |
https://app.crowdsec.net/cti/{{.Value}}{{end -}}{{end -}} | |
url: https://ntfy.sh/crowdsec | |
method: POST | |
headers: | |
Content-Type: "text/plain" | |
Title: "Crowdsec Trigger" | |
Tags: "warning" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment