Splunk Search

Having issues w/ timecharting basic counts.

clintla
Contributor

My base search works great for a 12 hour search

sourcetype="logs" | timechart count as eventcount by host useother = f

I've tried several variations on just getting the top couple using Top
per | top count by host

but nogo.

Would there be an easy way to say if an any hour exceeds 100 events then show the entire
12 hours for those hosts?

Even just showing where events hit over 100 for an hour for any host would be very helpful.

Tags (2)
0 Karma

sdaniels
Splunk Employee
Splunk Employee

To do the search by hour just use the bucket command.

<your search> | bucket _time span=1h | timechart count as mycount

This will give you a table with values by host greater than 100

<your search> | bucket _time span=1h | stats count as mycount by host,_time | where mycount > 100
0 Karma

clintla
Contributor

Close. My fault for not being more specific.

I'm trying to timechart out hosts that have event counts > 100.

Seems like I should be closer with the below.
| bucket _time span=1h | timechart count as mycount by host | where mycount > 100

Or is there a way to chart any host for the whole 12 hours if it gets 1 hour over 100?

| timechart per_hour(count) as mycount by host | search mycount > 100

Always an illegal search due to permissions or invalid arguement.

I'll keep tinkering- feel like Im closer- not quite there yet though.

I appreciate the help!

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 ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...