Splunk Search

Exclude 'default'/'system' fields in `table *`

henricook
New Member

I've got a JSON event that I like to tabulate by using `index=myindex | table *`

When I do this though it includes some system fields, such as `host`, `index`, `linecount`, `punct`, `source`, `sourcetype`

Does anyone know if there's a way to exclude them without naming them all individually via a built in method/variable?

e.g. `index=myindex | fields - $SYSTEM_FIELDS$ | table *`

Thanks,

Henri

Labels (3)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@henricook 

Not sure there is Splunk Variable available globally for that. But you can go with your approach by removing all default fields.

like,

| fields - _indextime, _cd, _bkt, host, index, linecount, punct, source, sourcetype, splunk_server, timestamp,date_*

_raw and _time also default field we should keep it.  🙂 

Check below link for more details about Default Fields

https://docs.splunk.com/Documentation/Splunk/8.2.1/Knowledge/Usedefaultfields#Use_default_fields

 

Thanks
KV
▄︻̷̿┻̿═━一

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...