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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

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