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!

Cloud Platform | Customer Change Announcement: Email Notification Will Be Available ...

The Notification Team is migrating our email service provider since currently there’s no support ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...