All Apps and Add-ons

Help extracting fields

nadine_wondem
New Member

We are having problems with field extractions. The transforms.conf stanza looks like:

[kv_for_cisco_wsa_w3c]
DELIMS = " "
FIELDS = "date", "time", "x_elapsed_time", "cs_username", "c_ip", "s_ip", "cs_bytes", "sc_bytes", "cs_method", "cs_mime_type", "s_computerName", "s_port", "cs_url", "x_webcat_code_full", "x_sophos_virus_name", "x_webroot_threat_name", "x_wbrs_score", "x_wbrs_threat_type", "x_wbrs_threat_reason", "sc_result_code", "sc_result_code_denial", "cs_Referer", "cs_User_Agent"

However, it seems to be confused with cases where there is a quotation mark in the url. It includes part of the x_webcat_code_full as part of the URL. For example the cs_url ends with &dL_inYP=13. This is followed by a space and the x_webcat_code_full which is "Search Engines and Portals"

The app is extracting the cs_url as &dL_inY=555&dL_inYP=13 "Search

It then stores Engines as the x_webcat_code_full and Portals" as the x_webroot_threat_name.

There is a space after the URL so why does it think that the "Search is part of the URL? Any help would be appreciated.

Any idea why this is happening?

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

Hi,

the issue is because the data has quotation marks in it.
http://docs.splunk.com/Documentation/Splunk/latest/Admin/transformsconf

DELIMS =
* NOTE: This attribute is only valid for search-time field extractions.
* IMPORTANT: If a value may contain an embedded unescaped double quote
character, such as "foo"bar", use
REGEX, not DELIMS. An escaped double
quote (\") is ok.

This is one of the many reasons why W3C log format is so horrible. Perhaps a SEDCMD on the input to escape those quotes?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...