Splunk Search

Specify a day w/ a Token

clintla
Contributor

Just looking for a simple way to do this. 

I have an input token of how many days to look back where I want to just specify a full day with a days ago selection. 

| join type=outer name
[search daysago=60 enddaysago=59

works in a manual search when I just put in 60 & 59

But when I do a chart w/ an input panel

| join type=outer name
[search daysago=$day$ enddaysago=($day$-1)

I've tried an eval prior to the time

eval daybefore=$day$-1

and this doesnt work either. 

Seems like there should be a quick way to do this but just setting a token doesnt seem to be a place in the sourcecode where its allowed w/ a text input

Labels (1)
Tags (3)
0 Karma
1 Solution

clintla
Contributor

I'd tried the eval in the drill down w/o much luck but I found this

 

enddaysago=60 searchtimespandays=1

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you tried setting a second token in your input panel and use that?

0 Karma

clintla
Contributor

I'd tried the eval in the drill down w/o much luck but I found this

 

enddaysago=60 searchtimespandays=1

0 Karma
Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...