Splunk Search

Search query in block manager of Splunk Template (html ) does accept double quotes (Django Bindings)

harshal_chakran
Builder

Hi,

I have created an app using Django Bindings. I used the search query in Splunk template page(html)as follows:

{% searchmanager id="search1"
search="source="sourcefile.txt"| stats count(eval(searchmatch("ERROR_VALUE"))) as error"
preview=True
%}

but it doesn't take "sourcefile.txt" and "ERROR_VALUE" as it is with double quotes and shows error . Is there any way to escape these double quotes inside the search query?

Please Help...!!!

0 Karma

mgroves_splunk
Splunk Employee
Splunk Employee

The simplest way is do use single quotes to wrap the search and double quotes to handle the source.

{% searchmanager id="search1"
search='source="sourcefile.txt"| stats count(eval(searchmatch("ERROR_VALUE"))) as error'
preview=True
%}

Get Updates on the Splunk Community!

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, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...