Splunk Search

same field name exists in two indexes but with different values

moayadalghamdi
Path Finder

Hola splunker.

 

i performed a search using two indexes, but these tow indexes have different fields that uses the same field name, for example:

EmailServer: has the filed name message_subject

EmailProxy: has the filed name message_subject

 

i want to search using the  message_subject from the EmailServer

 

index=EmailServer OR index=EmailProxy NOT (src_ip=10.0.0.0/8 OR src_ip=192.168.0.0/16 OR src_ip=172.16.0.0/12 ) | table src_ip sender EmailServer.message_subject

 

 

Thanks ^_^^

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=EmailServer OR index=EmailProxy NOT (src_ip=10.0.0.0/8 OR src_ip=192.168.0.0/16 OR src_ip=172.16.0.0/12 ) 
| eval "EmailServer.message_subject"=if(index="EmailServer",message_subject,null)
| table src_ip sender EmailServer.message_subject
0 Karma

moayadalghamdi
Path Finder

Thanks for the answer Whisperer ^_^

 

this is the result i got:

moayadalghamdi_0-1622108074099.png

i forgot to tell you something, the src_ip field only exists at the EmailProxy, so the field sender is mutual,

so i want the stats to have:

 

EmailProxy.src_ip /// EmailServer.sender /// EmailServer.message_subject.

 

 

 

Thanks^_^

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=EmailServer OR index=EmailProxy NOT (src_ip=10.0.0.0/8 OR src_ip=192.168.0.0/16 OR src_ip=172.16.0.0/12 ) 
| eventstats values(src_ip) as "EmailProxy.src_ip" by sender
| eval "EmailServer.message_subject"=if(index="EmailServer",message_subject,null)
| table EmailProxy.src_ip sender EmailServer.message_subject
0 Karma

moayadalghamdi
Path Finder

w'ere getting close !

 

unfortunately the src_ip field is null:

 

moayadalghamdi_0-1622109360103.png

 

 

also the are empty records/Almost empty records:

moayadalghamdi_1-1622109411926.png

 

 

 

thanks so much for your time, i really appreciate it, please help with this one

 

 

^_^

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you clarify that the proxy will have events for user and src_ip and the server will have events for the user and subject, i.e. the exact same value for user exists in both sets of events? If not, how are you trying to correlate events from the two indexes?

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...