Splunk Dev

How to bucket fields with and without quotes together

BlueBjorn
Engager

A recent change to logs has broken my dashboard panels and reporting. I'm struggling to find the best way to modify my search criteria to pick up data prior to the change and after. It's a very simple change as single quotation marks were added around the field but it's giving me a big headache. 

index=prd sourcetype=core Step=* Time=* |  timechart avg(Time) by Step span=1d

Field in event log changed:

FROMStep=CONVERSION_APPLICATION

TOStep='CONVERSION_APPLICATION'  (with single quotation marks)

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Strip the quotes with the trim function.

index=prd sourcetype=core Step=* Time=* 
| eval Step=trim(Step, "'")
| timechart avg(Time) by Step span=1d

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

BlueBjorn
Engager

That worked. Thank you very much!! 

richgalloway
SplunkTrust
SplunkTrust

Strip the quotes with the trim function.

index=prd sourcetype=core Step=* Time=* 
| eval Step=trim(Step, "'")
| timechart avg(Time) by Step span=1d

 

---
If this reply helps you, Karma would be appreciated.
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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

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