Getting Data In

How to use fields from different source types in the same search?

julianglavey
New Member

Hi all,

I am looking to try and figure out how to compose a query that has information I need in two distinct sourcetypes with potentially no shared field. The query is to figure out who launched a AWS EC2 instance that is not tagged correctly.

I can find the instance launched details using this query.

index=* sourcetype="ec2-audit" earliest_time=-1h instance_id=* NOT tag_Service="Self" 
| where isnull(tag_Opco) OR isnull(tag_Environment) OR isnull(tag_Cartesis) OR isnull(tag_Requester) OR isnull(tag_Service) OR isnull(tag_Product) OR isnull(tag_Role) OR isnull(tag_Username) OR isnull(tag_GST)
| dedup instance_id 
| table index status type instance_id tag_Name tag_Environment tag_Service tag_Opco tag_Cartesis tag_Product tag_Role tag_Requester tag_Username tag_GST

The problem is this source type does not contain any information around the user who is logged into the AWS console, and subsequently launched the instance. That is found using this querying index=cloudtrail sourcetype=aws-cloudtrail, which has a object userIdentity.arn which matches the person who launched the instance.

So I know this is quite vague, but any is greatly appreciated

Julian

Tags (2)
0 Karma

sanjay_shrestha
Contributor

Can you correlate with time?

0 Karma

julianglavey
New Member

Hi Sanjay,

If I can I don't know how to.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...