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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...