Splunk Search

Lookup table question

pitshot
Explorer

Using Splunk v 5.04

I have a lookup table containing devicename,interfacename,speed . Each device name can have multiple interfaces associated with it. What I am trying to do is count the interfaces associated to a particular devicename.

|inputlookup LUTOPO | search DEVICENAME="rr1.yyz3*" AND SPEED>=10000000000 | stats count(INTERFACENAME) as count | table DEVICENAME count

The search returns a count of the interfaces but does not show the devicename in the table.

Tags (1)
0 Karma

MarioM
Motivator

because you need a split by in your stats:

| stats count(INTERFACENAME) as count by DEVICENAME

piebob
Splunk Employee
Splunk Employee

pitshot, in the future, if another community member's answer solves your problem, please check the checkmark next to it to accept the answer. thanks!

0 Karma

pitshot
Explorer

Perfect, Thanks

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...