Splunk Search

Eval threshold for a specific day of the week

dcraven02
New Member

Each Monday the skype call logs have a low count;

e.g skypeuk is around 30 and skypeus is around 200 events whereas the rest of the week skypeuk is 290 and skypeus is 700.

How do I add in an exception for this or a separate search for this for to run a separate search if the day is Monday.

| tstats count as "Data Received" where index=msexchange  host=opspkhf03p  source=otl_dbin_skypeuk
| eval result=if('Data Received'> 290, "PASS", "FAIL")
| eval host="opspkhf03p"
| append 
    [| tstats count as "Data Received" where  index=msexchange  host=opspkhf03p source=skypeus
| eval result=if('Data Received'> 700, "PASS", "FAIL")
| eval host="opspkhf03p"]
| table host, "Data Received", result
0 Karma

tiagofbmm
Influencer

You can do the tstats by _time and then evaluate if it is a Monday or not:

 | tstats count where index=_internal by _time span=1d
 | eval date_wday=strftime(_time,"%A")
 | eval result=if(count> 700 AND date_wday=="Monday", "PASS", "FAIL")
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...