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!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureThursday, March 27, 2025  |  11AM PST / 2PM EST | Register NowStep boldly ...

Splunk AppDynamics with Cisco Secure Application

Web applications unfortunately present a target rich environment for security vulnerabilities and attacks. ...