Dashboards & Visualizations

Token

Stives
Engager

Dear Sir, I would like to set a token in order to be able modify -1h treshold.

| tstats latest(_time) as latest where index=* earliest=-24h by host
| eval recent = if(latest > relative_time(now(),"-1h"),1,0), realLatest = strftime(latest,"%c")
| eval data=case(recent=="0","No Data",recent=="1","OK")
| table host,realLatest,data

My earliest -24h token works fine, but I would like to set token alo for "-1h" relative time in order to be able modify treshold. Can you help ?

Thank you in advance.

regards,

Stives

Labels (1)
0 Karma

Stives
Engager

Resolved, thaks

0 Karma

niketn
Legend

@Stives Request you to post what you tried which fixed the issue. Accept the answer to mark the question as answered.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...