Splunk Search

How to list field and their values?

truongvinh2112
New Member

My log is formatted like this:

labels{
       appsplunk-kubernetes-metrics
       app.kubernetes.io/managed-byHelm
       chartsplunk-kubernetes-metrics-1.4.1
       enginefluentd
       heritageHelm
       releasesplunk-monitor

How do I find a list of fields and their values? I want to list all the values in field labels.

Thanks!

Labels (2)
0 Karma

codebuilder
Influencer

Are you just trying to find out what fields are available?
If so you can simply run the following and look at the table or click on "events" to see all the fields.
(Use "head" to limit the results or choose a short time span with the time picker so that you dont get back the entire result set.)

index=your_index_name |head 100 |table *


 

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| extract
| rename labels.* as *
0 Karma

truongvinh2112
New Member

truongvinh2112_0-1628738260650.pngtruongvinh2112_1-1628738377408.png

I'm trying to build a K8s dashboard on Splunk. I tried your way but not working. Can you be more specific?

The image above is an example.

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Sure. What do these images represent? What did you get when you tried my suggestion? Can you share the raw events in a code block </> so we can see what you are dealing with and try some tests?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

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 ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...