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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...