Hi Everyone, I'm new to Splunk and am having difficulty making a simple(ish) query.
I'd like to display select fields from 3 indexes in a table, and need to use the output of a search on one index to search the other two. The end goal is to grab IP addresses from firewall logs, and use them to match hostnames and user names to each firewall event. This searches index=users using the src_ip field from index=firewall:
index=users User!="del*ted" [search index=firewall | fields srcip ] | table User srcip | rename User AS user-id | rename src_ip AS ip-address
Here's where I'm having difficulties:
I've tried a few different approaches, including join, and have just not been able to make this all work together. I'd really appreciate any help you guys can give. Thank You!
index=firewall OR (index=users User!=del*ted") OR index=network | stats latest(event_description) as event_description latest(User) as user-id latest(hostname) as hostname by src_ip
is probably close, though you'll get src_ip and events from before your desired time range. You can actually do something like this:
(earliest=-10h index=firewall) OR (earliest=-34h ((index=users User!=del*ted") OR index=network))