Splunk Search

Timechart question

estrand
New Member

Hi,
I have the following saved query display as a graph in a view

index="generator" CustomGenerator earliest=-12h latest=-1m | rex field=_raw "sessionid : (?.*)|timechart span=1m dc(sessionid) as Sessions

This gives me a graph of unique sessions per minute over the last 12 hours and seems to work fine.
However, what I really want is this graph over the last 24 hours. When I change earliest=-12h to earliest=-24h, the graph only displays the last 15 hours or so.

How can I best get around this?

Thanks,

-Erik

Tags (1)
0 Karma

David
Splunk Employee
Splunk Employee

I'd assume it's probably because you have span=1m, which would result in 1440 different buckets, which is probably more than the timechart can handle. What happens if you change it to span=2m?

If that doesn't solve it, what happens when you run the query from the normal search window (and look at it in tabular format). Do you still see only 15 hours of data?

David
Splunk Employee
Splunk Employee

Sure. You might also opt to go for max(Sessions) instead of avg, if you want to insure you have the spikes.

0 Karma

estrand
New Member

Thanks. That's the closest so far. The avg gives me slightly lower values on the spikes, but not by a lot. I'll leave it like this a few days and see if I can live with it 🙂

0 Karma

David
Splunk Employee
Splunk Employee

Someone might jump in and tell me otherwise, but I'm not sure you'll get around the limit. Would you get what you need by using span=1m and adding a | timechart span=2m avg(Sessions) as Sessions at the end?

0 Karma

estrand
New Member

Yes, I forgot to mention that, span=2m gives me 24 hour graph, but the values are different over a 2 minute span than a 1 minute span

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...