notify threshold
This commit is contained in:
parent
1557a1dd07
commit
1bc7fe0bb5
@ -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"
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user