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!

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...