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!

Splunk App Dev Quarterly Roundup: AI, Agents, and Innovation!

Another quarter, another wave of innovation. From complex integrations to pushing the limits ...

What’s New in Splunk AI: Volume 02

Welcome to the second edition of “What’s New in Splunk AI” where we look at the latest and greatest updates, ...

Value Insights: Now Generally Available in the CMC

Organizations are under pressure to move faster, control cost, expand AI adoption, and prove value with more ...