scriptbox/crowdsec-notifications/line.yaml

27 lines
695 B
YAML
Raw Normal View History

2024-03-22 13:11:46 +00:00
type: http
name: line
log_level: info
format: |
message=
{{range . -}}{{$alert := . -}}{{range .Decisions -}}
[ *{{.Scenario}}* ]
{{if $alert.Source.Cn -}}{{ $alert.Source.Cn }}{{end}}{{if not $alert.Source.Cn -}}N/A{{end}} {{$alert.Source.IP}}
{{if $alert.Source.AsNumber -}}AS{{ $alert.Source.AsNumber }}: {{ $alert.Source.AsName }}{{else}}AS: N/A{{end}}
Action: {{.Type}} {{.Duration}} on {{ Hostname }}
Count : {{ $alert.EventsCount }}
Start:
{{ $alert.StartAt }}
Stop:
{{ $alert.StopAt }}{{end -}}{{end -}}
2024-03-22 13:11:46 +00:00
url: https://notify-api.line.me/api/notify
method: POST
headers:
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <access_token>