Splunk Search

Trying to extract field, from a CSV extracted fields

castle1126
Communicator

Hi,

I'm running my environment with one main indexer and one search head. I have an index on the main indexer where each event is a space delimited line. In my etc/system/local/transforms.conf on the search head I have this set:

[csv_extract] DELIMS = " " FIELDS = "src_ip", "dest_ip", "request"

I then want to take the values for the field named "request" and break those up into parts. So I wrote this stanza in transforms.conf:

[protocol_extract] REGEX = ^(\w*):// SOURCE_KEY = request FORMAT = proto::$1

Both stanzas are added to the search head's etc/system/local/props.conf as:

[weblogs] KV_MODE = none REPORT-csv_extract = csv_extract REPORT-protocol_extract = protocol_extract

When I restart Splunk and perform a search over that data the fields extracted by the [csv_extract] work fine, but the [protocol_extract] doesn't work. When I run the search adding | extract reload=T all fields show up, including the [protocol_extract]. Then I drop the | extract reload=T and run the search again. This time the [protocol_extract] field disappears again! Any subsequent restart of Splunk performs the same way....

I'm running 4.1.2 on my main indexer and the search head.

Any ideas on what I'm doing wrong???

Tags (2)

Genti
Splunk Employee
Splunk Employee

I had a similar case just today.
Try the following props.conf:
[weblogs]
KV_MODE = none
REPORT-extracts = csv_extract protocol_extract

Let me know how it goes,
.gz

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...