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
Revered Legend

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!

See Splunk Platform & Observability Innovations at Cisco Live EMEA

Hi Splunkers, Learn about what’s next for Splunk Platform at Cisco Live EMEA.  Data silos are a big challenge ...

The OpenTelemetry Certified Associate (OTCA) Exam

What’s this OTCA exam? The Linux Foundation offers the OpenTelemetry Certified Associate (OTCA) credential to ...

From Manual to Agentic: Level Up Your SOC at Cisco Live

Welcome to the Era of the Agentic SOC   Are you tired of being a manual alert responder? The security ...