notify threshold

This commit is contained in:
darius 2024-05-27 13:25:16 +02:00
parent 1557a1dd07
commit 1bc7fe0bb5
2 changed files with 4 additions and 0 deletions

View File

@ -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"

View File

@ -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 {