Dashboards & Visualizations

Remove \ at the end of field values

marco_massari11
Communicator

Hi,

I have some syslog logs and for a field those possible values:

myfield=sjhfshgfjwes\

myfield=abah\

myfield=dshaese\

 

I have a query tho show the result in a column chart:

index=myindex site=* myfield=*

| chart count by site myfield

 

When I click on a bar, I have another dashboard that shows some informations for the specific myfield, but I have an error  "Unbalanced quotes", I think for the final \. How can I remove \ at the end of the field values?

 

Thank you in advance

Labels (5)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this.

... | eval myfield=rtrim(myfield,"\\")
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try this.

... | eval myfield=rtrim(myfield,"\\")
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...