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!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...