Jelajahi Sumber

update notifications template (#1188)

* update notifications template
AlteredCoder 3 tahun lalu
induk
melakukan
9b3db6b6bb

+ 1 - 1
plugins/notifications/email/email.yaml

@@ -8,7 +8,7 @@ format: |  # This template receives list of models.Alert objects
   {{range . -}}
   {{range . -}}
     {{$alert := . -}}
     {{$alert := . -}}
     {{range .Decisions -}}
     {{range .Decisions -}}
-      <a href=https://www.whois.com/whois/{{.Value}}>{{.Value}}</a> will get <b>{{.Type}}</b> for next <b>{{.Duration}}</b> for triggering <b>{{.Scenario}}</b>. <a href=https://www.shodan.io/host/{{.Value}}>Shodan</a>  
+      <a href=https://www.whois.com/whois/{{.Value}}>{{.Value}}</a> will get <b>{{.Type}}</b> for next <b>{{.Duration}}</b> for triggering <b>{{.Scenario}}</b> on machine <b>{{$alert.MachineID}}</b>. <a href=https://www.shodan.io/host/{{.Value}}>Shodan</a>  
     {{end -}}
     {{end -}}
   {{end -}}
   {{end -}}
 
 

+ 2 - 2
plugins/notifications/slack/slack.yaml

@@ -9,9 +9,9 @@ format: |  # This template receives list of models.Alert objects
   {{$alert := . -}}
   {{$alert := . -}}
   {{range .Decisions -}}
   {{range .Decisions -}}
   {{if $alert.Source.Cn -}}
   {{if $alert.Source.Cn -}}
-  :flag-{{$alert.Source.Cn}}: <https://www.whois.com/whois/{{.Value}}|{{.Value}}> will get {{.Type}} for next {{.Duration}} for  triggering {{.Scenario}}. <https://www.shodan.io/host/{{.Value}}|Shodan>{{end}}
+  :flag-{{$alert.Source.Cn}}: <https://www.whois.com/whois/{{.Value}}|{{.Value}}> will get {{.Type}} for next {{.Duration}} for triggering {{.Scenario}} on machine '{{$alert.MachineID}}'. <https://www.shodan.io/host/{{.Value}}|Shodan>{{end}}
   {{if not $alert.Source.Cn -}}
   {{if not $alert.Source.Cn -}}
-  :pirate_flag: <https://www.whois.com/whois/{{.Value}}|{{.Value}}> will get {{.Type}} for next {{.Duration}} for  triggering {{.Scenario}}.  <https://www.shodan.io/host/{{.Value}}|Shodan>{{end}}
+  :pirate_flag: <https://www.whois.com/whois/{{.Value}}|{{.Value}}> will get {{.Type}} for next {{.Duration}} for triggering {{.Scenario}} on machine '{{$alert.MachineID}}'.  <https://www.shodan.io/host/{{.Value}}|Shodan>{{end}}
   {{end -}}
   {{end -}}
   {{end -}}
   {{end -}}