Splunk Search

Newbie question - top(field1) by field2?

kylar
Engager

I have a large log of items that come from different machines. Each machine generates some set of errors. I want to see the top 10 errors for each machine.

in my mental splunk-pseudocode, I thought something like this:

machine="linux6.*" error="*Exception" | top (error) by machine

would produce:

linux6.1 NullPointerException     7699
linux6.1 InvalidArgumentException 7102
linux6.2 NullPointerException     909
linux6.2 InvalidArgumentException 1019

I'm really new to splunk, please help!

Tags (1)
0 Karma

lukejadamec
Super Champion

Try:

top machine,error
0 Karma

_d_
Splunk Employee
Splunk Employee

machine="linux6.*" error="*Exception" | top error by machine

kylar
Engager

Ugh, it was just the parenthesis? I'm a moron 😞
Thanks!

rakesh_498115
Motivator

If error is the field , tat contains error messages..

your search | top error by machine

would give u top ten errors for each machine.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...