Splunk Search

Comparing 2 fields

xvxt006
Contributor

Hi,

I have 2 fields that are already extracted uri and referer. I want to right a search based on if
uri value =referer value. I guess i have to use eval. Can you please give me syntax?

Tags (1)
0 Karma

kristian_kolb
Ultra Champion
... | where uri==referer | ...

/K

gfuente
Motivator

Hello

Probably you need to remove the domain part from the referrer field, as the uri doesn't include that part. Lets say:
uri: /example/page.html
referrer: http://www.example.com/example/page.html

Regards

0 Karma

Ayn
Legend

That happens if uri is never equal to referer. Check your fields.

0 Karma

xvxt006
Contributor

Actually i tried this but did not work. i am getting no results.

0 Karma

Ayn
Legend
| eval yourfield=if(uri==referer,...

Ayn
Legend

Oh! No, very much incorrect. Early morning - correcting.

0 Karma

kristian_kolb
Ultra Champion

Is that correct? Normally eval is an assignment of a value to a field.

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...