mirror of
https://github.com/minoplhy/scriptbox.git
synced 2024-12-05 01:46:57 +00:00
27 lines
695 B
YAML
27 lines
695 B
YAML
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 -}}
|
|
|
|
url: https://notify-api.line.me/api/notify
|
|
|
|
method: POST
|
|
|
|
headers:
|
|
Content-Type: application/x-www-form-urlencoded
|
|
Authorization: Bearer <access_token>
|