Splunk Enterprise

Anomaly Detection on Server Log Warnings- Why is my alert being constantly triggered?

ceruleanLemon8
Engager

I am trying to set up anomaly detection based on the number of ModSecurity warnings in the log in real-time to indicate an attack. I set up an experiment in the MLTK with the query below and set up the alerting system. The app is used Mon-Fri, so we tried to account for the low traffic on Sat-Sun in the data model. Unfortunately, the alert is being triggered constantly. Can anyone assist with how to write the query or set up the experiment for my use case? 

 

index="APP_NAME_production" source="<PATH TO LOG>/modsec_audit.log:*" "ModSecurity: Warning"
| bin _time span=15m
| stats sum(linecount) as total_lines by _time
| eval HourofDay=strftime(_time,"%H")
| eval DayofWeek=strftime(_time, "%A")
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...