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
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...