Dashboards & Visualizations

How to fetch value of column in Splunk table?

ktanwar
Explorer

Hi all,

So lets suppose I have the following table:

Job_ID  Parameter_A  Parameter_B

1                   "Car"                     "Red"

2                    "Bus"                    "Blue"

 

I want to get value "Red" and use it in an eval function. How to do it? Thanks!

 

@bowesmana calling you for help like always!!!

Labels (4)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

In that table, it looks like you have two rows, each with 3 fields. The field 'Parameter_B' contains the value "Red" for row 1, so as @richgalloway says, you just use Parameter_B field in the eval statement.

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Field values are always referenced by the field name, "Parameter_B" in this case.  By saying | eval foo=Parameter_B you give the 'foo' field the value "Red" or "Blue".   To only set foo to "Red", use a conditional.

| eval foo=if(Parameter_B="Red", Parameter_B, null())

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...