25 lines
518 B
Go
Raw Normal View History

2024-05-10 14:23:54 +02:00
package services
import (
"os"
"strings"
"wazuh-notify/log"
)
func Filter() {
2024-05-27 13:01:39 +02:00
for _, rule := range strings.Split(inputParams.General.ExcludedRules, ",") {
2024-05-10 14:23:54 +02:00
if rule == inputParams.WazuhMessage.Parameters.Alert.Rule.ID {
log.Log("rule excluded")
log.CloseLogFile()
os.Exit(0)
}
}
2024-05-27 13:01:39 +02:00
for _, agent := range strings.Split(inputParams.General.ExcludedAgents, ",") {
2024-05-10 14:23:54 +02:00
if agent == inputParams.WazuhMessage.Parameters.Alert.Agent.ID {
log.Log("agent excluded")
log.CloseLogFile()
os.Exit(0)
}
}
}