Splunk Search

How to add two different soucetype

sushil_sh
Engager

Hi,

 

We are looking to join two different soucretype which is given below

1- first source type for  abc(In this soucetype it contains all server list)

 sourcetype=abc AlertName IN ("Health Service Heartbeat Failure", "Unexpected shutdown Event ID XXXX") | sort _time  | table ServerName, AlertName

     ,AlertTriggered | dedup ServerName, AlertName

     ,AlertTriggered

 

2- Second source type for  xyz(In this source type list contain only selective server i.e suport)

 

 sourcetype=xyz  StatusValue IN(blue) Company IN("Support")  | sort _time  desc | dedup ManagementGroup , ServerName  , _time  | table ManagementGroup,  ServerName, StatusValue,  _time

__________________________________________________________-

we looking for combine syntax on which we view data  like (serverName(support), Event ID includes heartbite Failure, Start time of event, End time of event).

 

I am looking for your response 

 

Thanks in advance

 

_

Labels (3)
0 Karma

jhanvidattani
Path Finder

@sushil_sh 
Using join command between both queries would look like this:

sourcetype="abc" <further_query> | join ServerName [search sourcetype="xyz" <further_query>]

 Basically, mentioned the field/s that is common for both searches. Further information about various options or behaviour of join command is available: join 

If you find my solution/debugging steps fruitful, an upvote would be appreciated.

0 Karma

sushil_sh
Engager

Hi All,

Please response from my query, waiting for your response

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...