diff --git a/wazuh-notify-go/services/init.go b/wazuh-notify-go/services/init.go index c8f8450..5c86064 100644 --- a/wazuh-notify-go/services/init.go +++ b/wazuh-notify-go/services/init.go @@ -81,6 +81,9 @@ func wazuhInput() { for i, _ := range configParams.PriorityMap { if slices.Contains(configParams.PriorityMap[i].ThreatMap, wazuhData.Parameters.Alert.Rule.Level) { + if inputParams.WazuhMessage.Parameters.Alert.Rule.Firedtimes%inputParams.PriorityMap[i].NotifyThreshold != 0 { + os.Exit(0) + } inputParams.Color = inputParams.PriorityMap[i].Color if inputParams.WazuhMessage.Parameters.Alert.Rule.Firedtimes >= inputParams.PriorityMap[i].MentionThreshold { inputParams.Mention = "@here" diff --git a/wazuh-notify-go/types/types.go b/wazuh-notify-go/types/types.go index f20f8ff..7e4453f 100644 --- a/wazuh-notify-go/types/types.go +++ b/wazuh-notify-go/types/types.go @@ -23,6 +23,7 @@ type General struct { type PriorityMap struct { ThreatMap []int `toml:"threat_map"` MentionThreshold int `toml:"mention_threshold"` + NotifyThreshold int `toml:"notify_threshold"` Color int `toml:"color"` } type MarkdownEmphasis struct {