Knowledge Management

Splunk doesn't preserve indentation line spaces in KV Store

kiril123
Path Finder

I am uploading data to KV Store in the following format with spaces at the beginning of each line:

AAAAA
\s\sBBBBB
\s\s\s\sCCCCC

However after the data is uploaded and then running a lookup search the data is displayed without indentation spaces:

AAAAA
BBBBB
CCCCC

Is it possible to change this behaviour?

0 Karma

valiquet
Contributor

\s is for regex only.

Try quotes:

"AAAAA"
"  BBBBB"
"    CCCCC"
0 Karma

kiril123
Path Finder

I have tried quotes as well - still not spaces at the beginning of the lines after the data is loaded to kv store. Looks like splunk strips them by default...

0 Karma

p_gurav
Champion

Hi,

Can you tell, why you want to preserve space?

0 Karma

kiril123
Path Finder

Hello,

Indentation spaces have a very important role in network device configurations (e.g. Cisco). They define a parent-child relationship between configuration lines.

0 Karma

valiquet
Contributor

\s is for regex only.

Try quotes:

"AAAAA"
" BBBBB"
" CCCCC"

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...