Skip to content

Commit

Permalink
Add missing googleChat.messageformat
Browse files Browse the repository at this point in the history
Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
  • Loading branch information
KeisukeYamashita authored and poiana committed Nov 19, 2020
1 parent 532f0fd commit 6205b07
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ googleChat:
webhookurl: "" # Google Chat WebhookURL (ex: https://chat.googleapis.com/v1/spaces/XXXXXX/YYYYYY), if not empty, Google Chat output is enabled
# outputformat: "" # all (default), text
# minimumpriority: "" # minimum priority of event for using this output, order is emergency|alert|critical|error|warning|notice|informational|debug or "" (default)
messageformat: "Alert : rule *{{ .Rule }}* triggered by user *{{ index .OutputFields \"user.name\" }}*" # a Go template to format Google Chat Text above Attachment, displayed in addition to the output from `GOOGLECHAT_OUTPUTFORMAT`, see [Slack Message Formatting](#slack-message-formatting) in the README for details. If empty, no Text is displayed before Attachment.
```
Usage :
Expand Down
3 changes: 0 additions & 3 deletions outputs/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func newSlackPayload(falcopayload types.FalcoPayload, config *types.Configuratio
var field slackAttachmentField

if config.Slack.OutputFormat == All || config.Slack.OutputFormat == Fields || config.Slack.OutputFormat == "" {
log.Print("not text!")
for i, j := range falcopayload.OutputFields {
switch v := j.(type) {
case string:
Expand Down Expand Up @@ -120,8 +119,6 @@ func newSlackPayload(falcopayload types.FalcoPayload, config *types.Configuratio
// iconURL = config.Slack.Icon
// }

log.Println(messageText)

s := slackPayload{
Text: messageText,
Username: config.Slack.Username,
Expand Down

0 comments on commit 6205b07

Please sign in to comment.