Splunk Search

Searching for punct field values

landen99
Motivator

As the title reveals, I am trying to search the punct field for specific values. The punct field is naturally tricky because it includes quotation marks, dashes, and other unique characters which naturally yield search errors or throw off the search.

The search below is most likely incorrect but serves to clarify the task and an example string including problematic characters:

| search punct="___::_..__--::_..__-_-_-___:__="_':\__()\_\_\.\\.'"

The most obvious problem with this string is the double quotation mark in the middle of the string. These strings vary in form with each event record and different strings may be desired for the punct search.

In summary, how do I search the event records for specific punct field values?

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You need to escape double quotes and backslashes with a backslash, then you can search for punct values like any other field="value".

View solution in original post

0 Karma

landen99
Motivator

This is for a normal search (currently).

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You need to escape double quotes and backslashes with a backslash, then you can search for punct values like any other field="value".

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

If that's your entire search then you should leave off the | search.

0 Karma

landen99
Motivator

Are you saying that the search for the string in the field above would look like this?:

| search punct="___::_..__--::_..__-_-_-___:__=\"_':\\__()\\_\\_\\.\\\\.'"
0 Karma

somesoni2
SplunkTrust
SplunkTrust

Based on the punct values I see in my logs, double qoutes is the only problematic character. You can escape it with a backward slash (\). How are you providing your punct filters, through dashboard/form input?

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...