<?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 Need create a query to compare two tables from different search and populate the difference in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658505#M54248</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have got two queries to populate the host, region, tech stack &amp;amp; environment details. One query is a lookup table that has the list of total number of host.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Master_List.csv | search Region="Asia" | search "Tech Stack"="Apple" | rename host as Total_Servers | table Total_Servers&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which gives below table:&lt;/P&gt;&lt;TABLE border="1" width="26.580645161290324%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Total_Servers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The second query gives us the list of hosts that are currently populating in splunk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | rex field=_raw "(?ms)]\|(?P&amp;lt;host&amp;gt;\w+\-\w+)\|"
| rex field=_raw "(?ms)]\|(?P&amp;lt;host&amp;gt;\w+)\|"
| rex field=_raw "\]\,(?P&amp;lt;host&amp;gt;[^\,]+)\," 
| rex field=_raw "\]\|(?P&amp;lt;host&amp;gt;[^\|]+)\|"
| regex _raw!="^\d+(\.\d+){0,2}\w"
| regex _raw!="/apps/tibco/datastore"
| lookup Master_List.csv "host"
| search "Tech Stack"="Apple"
| search Region="Asia"
| rename host as "Reporting_Servers" | table "Reporting_Servers"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which gives below table:&lt;/P&gt;&lt;TABLE border="1" width="21.68548387096774%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Reporting_Servers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Apple1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Apple4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Apple5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Now I want to create a query to compare these two table and populate the servers that are missing from the total servers. So that output of the above tables after comparison should be like below:&lt;/P&gt;&lt;TABLE border="1" width="190px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Non_Reporting_Servers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Apple2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Apple3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Apple6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to create a query to achieve the expected output table. Your kind inputs are highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You..!!!&lt;/P&gt;</description>
    <pubDate>Sun, 24 Sep 2023 08:20:07 GMT</pubDate>
    <dc:creator>Mrig342</dc:creator>
    <dc:date>2023-09-24T08:20:07Z</dc:date>
    <item>
      <title>Need create a query to compare two tables from different search and populate the difference</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658505#M54248</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have got two queries to populate the host, region, tech stack &amp;amp; environment details. One query is a lookup table that has the list of total number of host.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Master_List.csv | search Region="Asia" | search "Tech Stack"="Apple" | rename host as Total_Servers | table Total_Servers&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which gives below table:&lt;/P&gt;&lt;TABLE border="1" width="26.580645161290324%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Total_Servers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;Apple6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The second query gives us the list of hosts that are currently populating in splunk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | rex field=_raw "(?ms)]\|(?P&amp;lt;host&amp;gt;\w+\-\w+)\|"
| rex field=_raw "(?ms)]\|(?P&amp;lt;host&amp;gt;\w+)\|"
| rex field=_raw "\]\,(?P&amp;lt;host&amp;gt;[^\,]+)\," 
| rex field=_raw "\]\|(?P&amp;lt;host&amp;gt;[^\|]+)\|"
| regex _raw!="^\d+(\.\d+){0,2}\w"
| regex _raw!="/apps/tibco/datastore"
| lookup Master_List.csv "host"
| search "Tech Stack"="Apple"
| search Region="Asia"
| rename host as "Reporting_Servers" | table "Reporting_Servers"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which gives below table:&lt;/P&gt;&lt;TABLE border="1" width="21.68548387096774%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Reporting_Servers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Apple1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Apple4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;Apple5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Now I want to create a query to compare these two table and populate the servers that are missing from the total servers. So that output of the above tables after comparison should be like below:&lt;/P&gt;&lt;TABLE border="1" width="190px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Non_Reporting_Servers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Apple2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Apple3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="189px" height="25px"&gt;Apple6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to create a query to achieve the expected output table. Your kind inputs are highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You..!!!&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 08:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658505#M54248</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2023-09-24T08:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need create a query to compare two tables from different search and populate the difference</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658507#M54249</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to run a simplesearch like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | rex field=_raw "(?ms)]\|(?P&amp;lt;host&amp;gt;\w+\-\w+)\|"
| rex field=_raw "(?ms)]\|(?P&amp;lt;host&amp;gt;\w+)\|"
| rex field=_raw "\]\,(?P&amp;lt;host&amp;gt;[^\,]+)\," 
| rex field=_raw "\]\|(?P&amp;lt;host&amp;gt;[^\|]+)\|"
| regex _raw!="^\d+(\.\d+){0,2}\w"
| regex _raw!="/apps/tibco/datastore"
| lookup Master_List.csv "host"
| search "Tech Stack"="Apple"
| search Region="Asia"
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup Master_List.csv WHERE Region="Asia" AND "Tech Stack"="Apple" | eval eval host=lower(host), count=0 | fields host ]
| stats sum(count) AS total BY host
| where total=0
| rename host as "Not_Reporting_Servers" 
| table "Not_Reporting_Servers"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 08:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658507#M54249</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-24T08:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need create a query to compare two tables from different search and populate the difference</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658513#M54250</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you very much for your inputs..!! The query worked perfect for me.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 16:10:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Need-create-a-query-to-compare-two-tables-from-different-search/m-p/658513#M54250</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2023-09-24T16:10:42Z</dc:date>
    </item>
  </channel>
</rss>

