user84592
user84592

Reputation: 4882

Splunk, how to output kv and tables based on templates

I have a project needs to extract information from 16 input files, do some manipulation, output to a template file. The template format is something as below: The question is what splunk command I shall use to output a file based on template?

Template file format:

field1 = $1
field2 = $2
:
:
fieldN=  $N

column1, column2, column3, ...  columnM
$data11, $data21, $data31,  ...  $dataM1


$data1K, $data2K, $data3K,  ...  $dataMK

Upvotes: 0

Views: 39

Answers (1)

RichG
RichG

Reputation: 9926

There is no one Splunk command to do that. Furthermore, Splunk has no concept of "template file".

You can use outputcsv to produce the latter ("column1, column2, ...") portion of the output, but I know of no way to also do the first part.

Upvotes: 1

Related Questions