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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...