<?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: Query missing on each host in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-missing-on-each-host/m-p/683775#M233456</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222294"&gt;@CarolinaHB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;there are two solutions that depend on the&amp;nbsp; location of the monitoring perimeter:&lt;/P&gt;&lt;P&gt;if you have a lookup containing the list of each app that should be present in each host (called e.g. app_perimeter.csv and containing at least two fields: host and application), you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats count BY host application
| append [ | inputlookup app_perimeter.csv | eval count=0 | fields host application count ]
| stats sum(count) AS total BY host application
| eval status=if(total=0,"Missing","Present")
| table host application status&lt;/LI-CODE&gt;&lt;P&gt;If instead you don't have this lookup and you want to compare results e.g. of the last 24 hours with the results of the last 30 days, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt; earliest=30d latest=now
| eval period=if(_time&amp;gt;now()-86400,"Last day","Previous days")
| stats dc(period) AS period_count values(period) AS period BY host application
| eval status=if(period_count=1 AND period="Previous days","Missing","Present")
| table host application status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 05:40:31 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-04-10T05:40:31Z</dc:date>
    <item>
      <title>Query missing on each host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-missing-on-each-host/m-p/683773#M233455</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;Good Morning,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm working in a query to see which application is missing on each &lt;STRONG&gt;host.&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can you help me, please?&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Host&amp;nbsp; &amp;nbsp; &amp;nbsp;application&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Guardicore&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;Host1 cortex&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tenable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Trend Micro&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Host2 cortex&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tenable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I need, it to show me what is missing&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;In its example Guardicore y tenable&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regardes&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 04:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-missing-on-each-host/m-p/683773#M233455</guid>
      <dc:creator>CarolinaHB</dc:creator>
      <dc:date>2024-04-10T04:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query missing on each host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-missing-on-each-host/m-p/683775#M233456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222294"&gt;@CarolinaHB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;there are two solutions that depend on the&amp;nbsp; location of the monitoring perimeter:&lt;/P&gt;&lt;P&gt;if you have a lookup containing the list of each app that should be present in each host (called e.g. app_perimeter.csv and containing at least two fields: host and application), you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats count BY host application
| append [ | inputlookup app_perimeter.csv | eval count=0 | fields host application count ]
| stats sum(count) AS total BY host application
| eval status=if(total=0,"Missing","Present")
| table host application status&lt;/LI-CODE&gt;&lt;P&gt;If instead you don't have this lookup and you want to compare results e.g. of the last 24 hours with the results of the last 30 days, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt; earliest=30d latest=now
| eval period=if(_time&amp;gt;now()-86400,"Last day","Previous days")
| stats dc(period) AS period_count values(period) AS period BY host application
| eval status=if(period_count=1 AND period="Previous days","Missing","Present")
| table host application status&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 05:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-missing-on-each-host/m-p/683775#M233456</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-04-10T05:40:31Z</dc:date>
    </item>
  </channel>
</rss>

