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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...