Splunk Search

transforms with SOURCE_KEY using FIELDS

willamwar
Path Finder

Dataset

10.24.11.102 - user1 [10/Sep/2016:02:46:12 -0400] "GET http://www.foo.org:80/lib/stone/csrf/token.json HTTP/1.1" 200 393
10.32.52.18 - user2 [10/Sep/2016:02:28:21 -0400] "GET https://aaa.idm.purple.org:8443/login HTTP/1.1" 200 2049
10.210.18.17 - - [10/Sep/2016:00:10:57 -0400] "GET http://explore.google.org/robots.txt HTTP/1.1" 200 2049
10.31.2.124 - user3 [09/Sep/2016:21:04:47 -0400] "POST http://bar.tree.com:80/authn-callback HTTP/1.1" 200 1562

When I search for
index=library sourcetype=proxy_access

I do not get back ** method,url,protocol ** which would come from ** data_from_method_url**

When I search for

index=library sourcetype=proxy_access | extract reload=T
| extract ProzyData
| extract data_from_method_url

method, url, and protocol are all extracted correctly.

The first extraction REPORT-Extract is working as I get all of the expected fields.
GET http://www.foo.org:80/lib/stone/csrf/token.json HTTP/1.1
GET https://aaa.idm.purple.org:8443/login HTTP/1.1
GET http://explore.google.org/robots.txt HTTP/1.1
POST http://bar.tree.com:80/authn-callback HTTP/1.1

How do I get the method, url, and protocol to extract using the props and transforms.

I have done many version of these files, but this is how they currently read.

props.conf
  [proxy_access]
  REPORT-Extract = ProzyData
  description = Access Logs
  KV_MODE = none

  [pull_from_method_url]
  REPORT-method_from_method_url = data_from_method_url

transforms.conf
  [ProzyData]
  DELIMS = " "
  FIELDS =    "src_ip","Unknown","user","datetime","timeoffset","method_url","responce","bytes"

  ################ extract from source_key #############
  [data_from_method_url]
  SOURCE_KEY = method_url
  DELIMS = " "
  FIELDS = method,url,protocol
0 Karma

lquinn
Contributor

In your props.conf you have a stanza named pull_from_method_url. This settings under here should be under the same stanza at the other transform, proxy_access, as this is the sourcetype of your data. Stanza headings should be either sourcetype, source or host - unless I am misunderstanding and your data does have the sourcetype of pull_from_method_url?

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!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...