<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Join two indexes in one search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675771#M231184</link>
    <description>&lt;P&gt;Joins (with the join command) are generally best avoided as they are slow and have limitations. However, if you want to continue down this route, you should also note that field names are case sensitive, so if you were expecting Host from one set of events to be "joined" with host in the other set of events, they would have to share exactly the same field name. Without you sharing some sample events, it is not easy to determine whether this is your issue.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2024 13:31:54 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-01-29T13:31:54Z</dc:date>
    <item>
      <title>Join two indexes in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675759#M231181</link>
      <description>&lt;P&gt;I am noob with Splunk.&lt;/P&gt;&lt;P&gt;I am trying to join two indexes in one search -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx-enterprise-tools" sourcetype="spectrum:alarm:json"
| eval Host=substr(host,1,9)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Index -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=idx-sec-cloud sourcetype=rubrik:json  NOT (summary="*on demand backup*" OR custom_details.clusterName="ART1RBRK100P" OR custom_details.clusterName="ONT1RBRK100P" OR custom_details.clusterName="GRO1RBRK100P")
(custom_details.eventName="Snapshot.BackupFailed" NOT (custom_details.errorId="Oracle.RmanStatusDetailsEmpty" OR custom_details.errorId="Vmware.VmwareCBTCorruption")) 
OR (custom_details.eventName="Mssql.LogBackupFailed") 
OR (custom_details.eventName="Snapshot.BackupFromLocationFailed" NOT (custom_details.errorId="Fileset.FailedDataThresholdNas" OR custom_details.errorId="Fileset.FailedFileThresholdNas" OR custom_details.errorId="Fileset.FailedToFindFilesNas")) 
OR (custom_details.eventName="Vmware.VcenterRefreshFailed")
OR (custom_details.eventName="Hawkeye.IndexOperationOnLocationFailed")
OR (custom_details.eventName="Hawkeye.IndexRetryFailed")
OR (custom_details.eventName="Storage.SystemStorageThreshold")
OR (custom_details.eventName="ClusterOperation.DiskLost")
OR (custom_details.eventName="ClusterOperation.DiskUnhealthy")
OR (custom_details.eventName="Hardware.DimmError")
OR (custom_details.eventName="Hardware.PowerSupplyNeedsReplacement")
OR (custom_details.location="*/MSSQLSERVER")
| rename custom_details.eventName as EventName custom_details.errorId as ErrorCode custom_details.clusterName as ClusterName custom_details.location as LocationName
| eventstats count(eval(custom_details.location="*/MSSQLSERVER")) as MsSqlServer by summary&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying like this but I do not see any events where as both the indexes are giving events for same time frame-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="idx-enterprise-tools" sourcetype="spectrum:alarm:json"
| eval Host=substr(host,1,9)
| join host
    [ search index=idx-sec-cloud sourcetype=rubrik:json  NOT (summary="*on demand backup*" OR custom_details.clusterName="ART1RBRK100P" OR custom_details.clusterName="ONT1RBRK100P" OR custom_details.clusterName="GRO1RBRK100P")
(custom_details.eventName="Snapshot.BackupFailed" NOT (custom_details.errorId="Oracle.RmanStatusDetailsEmpty" OR custom_details.errorId="Vmware.VmwareCBTCorruption")) 
OR (custom_details.eventName="Mssql.LogBackupFailed") 
OR (custom_details.eventName="Snapshot.BackupFromLocationFailed" NOT (custom_details.errorId="Fileset.FailedDataThresholdNas" OR custom_details.errorId="Fileset.FailedFileThresholdNas" OR custom_details.errorId="Fileset.FailedToFindFilesNas")) 
OR (custom_details.eventName="Vmware.VcenterRefreshFailed")
OR (custom_details.eventName="Hawkeye.IndexOperationOnLocationFailed")
OR (custom_details.eventName="Hawkeye.IndexRetryFailed")
OR (custom_details.eventName="Storage.SystemStorageThreshold")
OR (custom_details.eventName="ClusterOperation.DiskLost")
OR (custom_details.eventName="ClusterOperation.DiskUnhealthy")
OR (custom_details.eventName="Hardware.DimmError")
OR (custom_details.eventName="Hardware.PowerSupplyNeedsReplacement")
OR (custom_details.location="*/MSSQLSERVER")
]
| rename custom_details.eventName as EventName custom_details.errorId as ErrorCode custom_details.clusterName as ClusterName custom_details.location as LocationName
| eventstats count(eval(custom_details.location="*/MSSQLSERVER")) as MsSqlServer by summary&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Jan 2024 13:08:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675759#M231181</guid>
      <dc:creator>man03359</dc:creator>
      <dc:date>2024-01-29T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Join two indexes in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675768#M231182</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/257114"&gt;@man03359&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;probably your search doesn't run because you renamed a field and used the previous field name.&lt;/P&gt;&lt;P&gt;Anyway, in general, avoid to use join because it's avery slow search, try using stats:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="idx-enterprise-tools" sourcetype="spectrum:alarm:json") OR 
(index=idx-sec-cloud sourcetype=rubrik:json  NOT (summary="*on demand backup*" OR custom_details.clusterName="ART1RBRK100P" OR custom_details.clusterName="ONT1RBRK100P" OR custom_details.clusterName="GRO1RBRK100P")
(custom_details.eventName="Snapshot.BackupFailed" NOT (custom_details.errorId="Oracle.RmanStatusDetailsEmpty" OR custom_details.errorId="Vmware.VmwareCBTCorruption")) 
OR (custom_details.eventName="Mssql.LogBackupFailed") 
OR (custom_details.eventName="Snapshot.BackupFromLocationFailed" NOT (custom_details.errorId="Fileset.FailedDataThresholdNas" OR custom_details.errorId="Fileset.FailedFileThresholdNas" OR custom_details.errorId="Fileset.FailedToFindFilesNas")) 
OR (custom_details.eventName="Vmware.VcenterRefreshFailed")
OR (custom_details.eventName="Hawkeye.IndexOperationOnLocationFailed")
OR (custom_details.eventName="Hawkeye.IndexRetryFailed")
OR (custom_details.eventName="Storage.SystemStorageThreshold")
OR (custom_details.eventName="ClusterOperation.DiskLost")
OR (custom_details.eventName="ClusterOperation.DiskUnhealthy")
OR (custom_details.eventName="Hardware.DimmError")
OR (custom_details.eventName="Hardware.PowerSupplyNeedsReplacement")
OR (custom_details.location="*/MSSQLSERVER"))
| stats 
   count(eval(custom_details.location="*/MSSQLSERVER")) as MsSqlServer
   BY host&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 13:26:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675768#M231182</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-29T13:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Join two indexes in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675771#M231184</link>
      <description>&lt;P&gt;Joins (with the join command) are generally best avoided as they are slow and have limitations. However, if you want to continue down this route, you should also note that field names are case sensitive, so if you were expecting Host from one set of events to be "joined" with host in the other set of events, they would have to share exactly the same field name. Without you sharing some sample events, it is not easy to determine whether this is your issue.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 13:31:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675771#M231184</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-29T13:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Join two indexes in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675791#M231188</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;man03359,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'd say nothing wrong with being a noob, we all are at some point, continuously.&lt;/P&gt;&lt;P&gt;To your question, while perhaps not quite directly responsive: you might want to create tags (and review the exisitng ones) for certain types of data that you know lies in different indexes and sourcetypes. This can be a way of creating a searchable correlation that is properly time-indexed; and then you can pivot to the specific index/sourcetype.&lt;BR /&gt;&lt;BR /&gt;Some explanation on tagging/eventypes here:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Knowledge-Management/what-is-the-basic-difference-between-tags-and-event-types/m-p/243840" target="_blank"&gt;what is the basic difference between tags and even... - Splunk Community&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.3/Knowledge/Abouttagsandaliases" target="_blank"&gt;About tags and aliases - Splunk Documentation&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Abouteventtypes" target="_blank"&gt;About event types - Splunk Documentation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 15:56:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-in-one-search/m-p/675791#M231188</guid>
      <dc:creator>JohnEGones</dc:creator>
      <dc:date>2024-01-29T15:56:17Z</dc:date>
    </item>
  </channel>
</rss>

