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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...