Splunk Search

Why am I not getting any results trying to get a count by field?

guillecasco
Path Finder

Pretty new with Splunk, simple question.

I have:

index=*  asset id: "*"  

I just want a table that counts every different asset id and show them in a table like:

assetid   count
abc       50
dfg       25
....      ....

using the count by, but I'm not getting any results.

Tags (2)
0 Karma

pradeepkumarg
Influencer

You need to extract asset id values into a field assetid, After which you can add | stats count by assetid at the end of your search to produce the resultset you wanted.

Use the built in field extractor if you need help in extracting the values into a field

0 Karma

guillecasco
Path Finder

can it be donde with rex command? how would that be?

0 Karma

guillecasco
Path Finder

hmmm ok, i´ll see how to extract this asset id with this "field extractor". thanks dude

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

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

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...