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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...