Splunk Search

Count the number of field

aatik5u
Path Finder

Hello,

So I have to count the number of resulted fields, it doesn't go far than this. for my search I have index=example sourcetype=example source=example, and the goal is to know how many fields are extracted from the results of this search.

 

Can anyone help please 😄 ?

Labels (4)
Tags (1)
0 Karma
1 Solution

Temuulen0303
Explorer

you can use fieldsummary command:

   index=example sourcetype=example | fieldsummary

And count fields using:

   index=example sourcetype=example | fieldsummary | table field | stats count

more about fieldsummary here:
fieldsummary - Splunk Documentation

View solution in original post

0 Karma

Temuulen0303
Explorer

you can use fieldsummary command:

   index=example sourcetype=example | fieldsummary

And count fields using:

   index=example sourcetype=example | fieldsummary | table field | stats count

more about fieldsummary here:
fieldsummary - Splunk Documentation

0 Karma

aatik5u
Path Finder

Thank you very much it's really helpful

Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...