Splunk Search

subsearch passing info

mcbradford
Contributor

I perform a serach that gives me a host name, but within the returned data the event does not contain the host_ip. Within the same index, a different type of event contains both values.

I think this can be done with a subsearch?

Is there any function within splunk to enrich the original event? Like a lookup?

Tags (1)
0 Karma

lguinn2
Legend

Try this

<your original search> | join hostname [search sourcetype=<other event type> | fields + host_id ]
0 Karma

MarioM
Motivator

easier than subsearch would be :

 <your search>  hostname=* host_ip=*

as it will only return event containing value in hostname AND in host_ip

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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 ...