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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...