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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...