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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...

Turn Cisco Telemetry Into Action with Cisco Data Fabric, powered by the Splunk ...

The surge in machine data is already hitting enterprise budgets, and the agentic era will only intensify it. ...

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...