Splunk Search

How can find all the possible fields from our raw logs for a index, excluding internal fields generated by Splunk

aditsss
Motivator

Hi,

I want to generate a new dashboard from the splunk logs .

I want all the fields that are present in the raw data . Not only the one that is generated by the splunk. 

I have this criteria:

index=abc ns=xyz app_name=gateway*

I want all the fields that are present for this query in raw data. Can someone guide we how can we get all the fields.

Thanks in advance.

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

The fields as you say are listed on the left - try adding them to your transformation e.g.

... search
| table *

View solution in original post

0 Karma

masonmorales
Influencer

Assuming they're already extracted, you can add | fieldsummary to your search.

0 Karma

aditsss
Motivator

Hi ITWhisperer,

 

Sample logs


2020-09-10T02:23:14.927038622Z app_name=abc ns=xyz pod_container=init-vault pod_name=abc-deployment-74-tlzxv message=secrets file already exists; exiting ...

2020-09-10T03:52:26.646777037Z app_name=abc ns=xyz pod_container=init-vault pod_name=babc-deployment-17-rpn2h message=secrets file already exists; exiting ...
host = lgpecpe.gso.bc.commessage = secrets file already existssource = /var/log/agent/tmp/containers.logsourcetype = container-log

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

kv does a reasonable job as a starting point

 

...
| kv

 

_raw_timeapp_namemessagenspod_containerpod_name
2020-09-10T02:23:14.927038622Z app_name=abc ns=xyz pod_container=init-vault pod_name=abc-deployment-74-tlzxv message=secrets file already exists; exiting ...2020-09-10 08:11:33abcsecrets file already existsxyzinit-vaultabc-deployment-74-tlzxv
2020-09-10T03:52:26.646777037Z app_name=abc ns=xyz pod_container=init-vault pod_name=babc-deployment-17-rpn2h message=secrets file already exists; exiting ...2020-09-10 08:18:52abcsecrets file already existsxyzinit-vault babc-deployment-17-rpn2h

 

0 Karma

aditsss
Motivator

Hi ITwhisperer,

I want to see the fields which are not available in logs.

There are some fields which are coming at the left as as selected fields and Interesting Fields

when we check logs.

I want to see all other fields that are present for particular index ,ns and app.

so that I can add them in logs and create Dashboards.

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The fields as you say are listed on the left - try adding them to your transformation e.g.

... search
| table *
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It depends on what your logs look like. Can you provide a sample? Otherwise, it is difficult to advise what will work for you.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...