Splunk Search

Need some help with Syntax

MBerikcurtis
Path Finder

I like to show results only for times between 7pm and 7am Monday through Friday OR anytime on Saturday or Sunday. I'd like to do this within the same search.

I'm using:

(date_wday="s*" OR (date_hour > 19 AND date_hour < 7))
Tags (2)
0 Karma
1 Solution

Ayn
Legend

date_hour can't both be more than 19 and less than 7 at the same time. You probably want OR instead of AND there.

View solution in original post

Ayn
Legend

date_hour can't both be more than 19 and less than 7 at the same time. You probably want OR instead of AND there.

MBerikcurtis
Path Finder

Perfect! Can't believe I missed that.

0 Karma
Get Updates on the Splunk Community!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...