<?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: Compare logs between two different datacenter and match the value. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562628#M196052</link>
    <description>&lt;P&gt;the hostA logs are being replicated to hostB datacenter. thats is the reason it is in both datacenter. this query didnt display any results.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Aug 2021 16:30:49 GMT</pubDate>
    <dc:creator>DougiieDee</dc:creator>
    <dc:date>2021-08-09T16:30:49Z</dc:date>
    <item>
      <title>Compare logs between two different datacenter and match the value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562604#M196045</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have two different datacenter . hostA and hostB are like datacenters and 1,2,3.... are hosts. hostA-1, hostA-2, hostA-3, hostA-4, hostA-5 . hostB-5, hostB-6, hostB-7, hostB-8. &amp;nbsp;and wanted to check side by side to those datacenters and only get the token value that matches. here is the sample log: 2021-08-05 19:01:59.677 INFO RestTemplate: {"logType":"STANDARD","message":"==========================request log================================================", "Method":"POST","Headers":"{Accept=[application/json], Content-Type=[application/json], Authorization=[Bearer eyJhQM8DMG8bEtCIsiZ0GjyYWxwt3ny1Q], Token=[basd23123], "Request body": {"accountNumber":824534875389475}}} hostA = 1 source = a.log sourcetype = a_log 2021-08-05 19:01:59.687 INFO RestTemplate: {"logType":"STANDARD","message":"==========================request log================================================", "Method":"POST","Headers":"{Accept=[application/json], Content-Type=[application/json], Authorization=[Bearer eyJhQM8DMG8bEtCIsiZ0GjyYWxwt3ny1Q], Token=[basd23123], "Request body": {"accountNumber":824534875389475}}} hostb = 6 source = a.log sourcetype = a_log &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if the Authorization matches on both hostA and hostB then only the matched are needed.&amp;nbsp;&lt;BR /&gt;eg&amp;nbsp;&lt;BR /&gt;hostA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hostB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result&lt;BR /&gt;asd132c&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; asd132c&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;matched&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:31:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562604#M196045</guid>
      <dc:creator>DougiieDee</dc:creator>
      <dc:date>2021-08-09T14:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Compare logs between two different datacenter and match the value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562620#M196049</link>
      <description>&lt;P&gt;Is this one or two events? There appear to be a timestamp start of the second event as part of the first event - is this just an artefact of copy/paste or are there really two events in one?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Authorization=\[(?&amp;lt;Authorization&amp;gt;[^\]]+)\].+(?&amp;lt;host&amp;gt;host\w+)\s=\s"
| eventstats values(host) as hosts by Authorization
| where mvcount(hosts) = 2&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:56:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562620#M196049</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-09T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compare logs between two different datacenter and match the value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562628#M196052</link>
      <description>&lt;P&gt;the hostA logs are being replicated to hostB datacenter. thats is the reason it is in both datacenter. this query didnt display any results.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 16:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/562628#M196052</guid>
      <dc:creator>DougiieDee</dc:creator>
      <dc:date>2021-08-09T16:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Compare logs between two different datacenter and match the value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/563150#M196214</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt; can u help me on this??&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 07:16:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/563150#M196214</guid>
      <dc:creator>DougiieDee</dc:creator>
      <dc:date>2021-08-13T07:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Compare logs between two different datacenter and match the value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/563272#M196252</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235178"&gt;@DougiieDee&lt;/a&gt;&amp;nbsp; Try below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Authorization=\[(?&amp;lt;Authorization&amp;gt;[^\]]+).+\}\s{0,1}(?&amp;lt;host&amp;gt;\S+)"
| stats values(host) as hosts by Authorization
| where mvcount(hosts) &amp;gt;= 2 
| eval result = "matched" &lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 14 Aug 2021 08:47:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-logs-between-two-different-datacenter-and-match-the/m-p/563272#M196252</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-08-14T08:47:33Z</dc:date>
    </item>
  </channel>
</rss>

