Add alert handling

This commit is contained in:
Nik Rozman
2023-10-27 18:05:58 +02:00
parent 3a14e9be09
commit 2f9c2c1969
4 changed files with 67 additions and 3 deletions

View File

@@ -80,7 +80,7 @@ func main() {
fmt.Printf("Loaded %d ignored subnets: %v\n", len(ignored), ignored)
// Create an instance of EventCounter to track events.
eventCounter := src.NewEventCounter(1*time.Minute, src.HandleAlert)
eventCounter := src.NewEventCounter(10*time.Second, src.HandleAlert)
go eventCounter.StartMonitoring()
// Open the named pipe for reading.