<?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 json file and find the difference in log file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/602950#M104945</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "CODE": {
    "modified_files": [
      "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/HEAD", 
      "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/config", 
      "a/D:\\\\splunk_code_replication\\\\BBB_CODE/.git/index", 
	  "a/D:\\\\splunk_code_replication\\\\BBB_CODE/.git/config",
	  "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/logs/refs/heads/master",
	  "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/version.json"
	  ]
	  }
	}
	{
  "TOOlKIT": {
    "modified_files": [
      "a/D:\\\\splunk_code_replication\\\\AAA_TOOLKIT/.git/HEAD", 
      "a/D:\\\\splunk_code_replication\\\\AAA_TOOLKIT/.git/config", 
      "a/D:\\\\splunk_code_replication\\\\BBB_TOOLKIT/.git/index", 
	  "a/D:\\\\splunk_code_replication\\\\BBB_TOOLKIT/.git/config",
	  "a/D:\\\\splunk_code_replication\\\\AAA_TOOLKIT/.git/logs/refs/heads/master", 
	  ]
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Above events is in splunk .We have two repos in git 1. AAA 2.BBB.When ever the repos will replicate and both repos should be same file. But in my case after replicate both repos files are missing so i should compare the files and whare are the files is missing and send an alert as difference in repos.&lt;/P&gt;&lt;H5&gt;INTERESTING FIELDS:&lt;/H5&gt;&lt;P&gt;CODE.Modified_files{}&lt;/P&gt;&lt;P&gt;TOOLKIT.Modified_files{}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output after comparing:&lt;/P&gt;&lt;P&gt;CODE.Modified_files{}&lt;/P&gt;&lt;P&gt;"a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/logs/refs/heads/master",&lt;BR /&gt;"a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/version.json"&lt;/P&gt;&lt;P&gt;These files are only present in AAA repo but not in BBB. So we need compare both AAA and BBB missing files. As per the event and show the difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 07:52:29 GMT</pubDate>
    <dc:creator>karthi2809</dc:creator>
    <dc:date>2022-06-23T07:52:29Z</dc:date>
    <item>
      <title>How to compare json file and find the difference in log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/599950#M104611</link>
      <description>&lt;P&gt;How to compare difference in the json file. If there is no difference we are good. But in my case i need to find compare N_aaa and A_aaa and find out the difference&amp;nbsp;&lt;/P&gt;
&lt;P&gt;N_aaa&lt;/P&gt;
&lt;P&gt;A_aaa&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"AAA": {&lt;BR /&gt;"modified_files": [&lt;BR /&gt;&lt;BR /&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;STRONG&gt;N_aaa&lt;/STRONG&gt;/aaa/pack-672b2efd6aada12ecfc8d1745f805706f43902f4.idx",&lt;BR /&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;STRONG&gt;N_aaa&lt;/STRONG&gt;/aaa/pack-672b2efd6aada12ecfc8d1745f805706f43902f4.pack",&lt;BR /&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;STRONG&gt;A_aaa&lt;/STRONG&gt;/aaa/objects/pack/pack-8a069e643d668a0715f82a237b44f1554535719f.idx",&lt;BR /&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;STRONG&gt;A_aaa&lt;/STRONG&gt;/aaa/objects/pack/pack-8a069e643d668a0715f82a237b44f1554535719f.pack"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 23:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/599950#M104611</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2022-05-31T23:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare json file and find the difference in log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/599966#M104612</link>
      <description>&lt;P&gt;What is the expected output?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:46:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/599966#M104612</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-05-31T17:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compare json file and find the difference in log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/599989#M104617</link>
      <description>&lt;P&gt;We comparing two git repos files(N_aaa,A_aaa). Both N_aaa and A_aaa file should be common. In case of any difference in the file should say as difference in the file&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;/SPAN&gt;&lt;STRONG&gt;N_aaa&lt;/STRONG&gt;&lt;SPAN&gt;/&lt;STRONG&gt;aaa/pack-672b2efd6aada12ecfc8d1745f805706f43902f4.idx"&lt;/STRONG&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;/SPAN&gt;&lt;STRONG&gt;A_aaa&lt;/STRONG&gt;&lt;SPAN&gt;/&lt;STRONG&gt;aaa/objects/pack/pack-8a069e643d668a0715f82a237b44f1554535719f.idx",&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;/SPAN&gt;&lt;STRONG&gt;N_aaa&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;/aaa/pack-672b2efd6aada12ecfc8d1745f805706f43902f4.pack&lt;/STRONG&gt;",&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"a/D:\\\\splunk\\\\Repos\\\\Wed\\\\&lt;/SPAN&gt;&lt;STRONG&gt;A_aaa&lt;/STRONG&gt;&lt;SPAN&gt;/&lt;STRONG&gt;aaa/objects/pack/pack-8a069e643d668a0715f82a237b44f1554535719f.pack&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 23:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/599989#M104617</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2022-05-31T23:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Compare json file and find the difference in log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/600001#M104621</link>
      <description>&lt;P&gt;Is Splunk the right tool for this? Perhaps you should be using something else to do the file comparison? You could then feed the logs from the output of the comparison to Splunk for it to monitor and report on?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 04:49:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/600001#M104621</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-01T04:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare json file and find the difference in log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/600069#M104626</link>
      <description>&lt;P&gt;To me, the desired output looks like a stripped-down version of the input.&amp;nbsp; You can do that using &lt;FONT face="courier new,courier"&gt;spath&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;mvexpand&lt;/FONT&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath | mvexpand "AAA.modified_files{}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 12:12:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/600069#M104626</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-06-01T12:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Compare json file and find the difference in log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/602950#M104945</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "CODE": {
    "modified_files": [
      "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/HEAD", 
      "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/config", 
      "a/D:\\\\splunk_code_replication\\\\BBB_CODE/.git/index", 
	  "a/D:\\\\splunk_code_replication\\\\BBB_CODE/.git/config",
	  "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/logs/refs/heads/master",
	  "a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/version.json"
	  ]
	  }
	}
	{
  "TOOlKIT": {
    "modified_files": [
      "a/D:\\\\splunk_code_replication\\\\AAA_TOOLKIT/.git/HEAD", 
      "a/D:\\\\splunk_code_replication\\\\AAA_TOOLKIT/.git/config", 
      "a/D:\\\\splunk_code_replication\\\\BBB_TOOLKIT/.git/index", 
	  "a/D:\\\\splunk_code_replication\\\\BBB_TOOLKIT/.git/config",
	  "a/D:\\\\splunk_code_replication\\\\AAA_TOOLKIT/.git/logs/refs/heads/master", 
	  ]
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Above events is in splunk .We have two repos in git 1. AAA 2.BBB.When ever the repos will replicate and both repos should be same file. But in my case after replicate both repos files are missing so i should compare the files and whare are the files is missing and send an alert as difference in repos.&lt;/P&gt;&lt;H5&gt;INTERESTING FIELDS:&lt;/H5&gt;&lt;P&gt;CODE.Modified_files{}&lt;/P&gt;&lt;P&gt;TOOLKIT.Modified_files{}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output after comparing:&lt;/P&gt;&lt;P&gt;CODE.Modified_files{}&lt;/P&gt;&lt;P&gt;"a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/logs/refs/heads/master",&lt;BR /&gt;"a/D:\\\\splunk_code_replication\\\\AAA_CODE/.git/version.json"&lt;/P&gt;&lt;P&gt;These files are only present in AAA repo but not in BBB. So we need compare both AAA and BBB missing files. As per the event and show the difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-compare-json-file-and-find-the-difference-in-log-file/m-p/602950#M104945</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2022-06-23T07:52:29Z</dc:date>
    </item>
  </channel>
</rss>

