Splunk Search

appendcols with timechart when queried for longer window - appendcols results empty

sethuk555
Engager

Hi,

index=test sourcetype=access "READ/1.1" idvalue="" | timechart count(idvalue) as TotalRequests span=30m | appendcols [ search "READ/1.1" idvalue="" | timechart dc(idvalue) as Distinctrequests span=30m ] | eval Repeatedrequests=TotalRequests - Distinctrequests

With the above query I need to just pull the total and unique requests.For smaller window the query results are fine.If the search duration is for longer window say 7 days then the appendcols search "Distinctrequests" values are 0 in the beginning of the search window even though its not 0 actually.

Please let me know if any corrections in the query to be made.

Tags (1)
0 Karma

sundareshr
Legend

You have a idvalue="" in your root search, which could probably be why you're getting 0 results. Change that to idvalue=*

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...