<?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 How to create an alert if any one log file is missing from long list of files from same location? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379313#M11385</link>
    <description>&lt;P&gt;We need to create an alert if any one log file is missing from long list of files from same location.&lt;/P&gt;

&lt;P&gt;index= index=auto_prod_cm_comparisions source=*cert_details.log |stats values(source) by host&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:57:36 GMT</pubDate>
    <dc:creator>abhi04</dc:creator>
    <dc:date>2020-09-29T19:57:36Z</dc:date>
    <item>
      <title>How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379313#M11385</link>
      <description>&lt;P&gt;We need to create an alert if any one log file is missing from long list of files from same location.&lt;/P&gt;

&lt;P&gt;index= index=auto_prod_cm_comparisions source=*cert_details.log |stats values(source) by host&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379313#M11385</guid>
      <dc:creator>abhi04</dc:creator>
      <dc:date>2020-09-29T19:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379314#M11386</link>
      <description>&lt;P&gt;And I have more than 50 log files  per host&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 10:55:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379314#M11386</guid>
      <dc:creator>abhi04</dc:creator>
      <dc:date>2018-06-11T10:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379315#M11387</link>
      <description>&lt;P&gt;There are a couple ways to do this.  You could keep a "master list" of log files as a CSV lookup, then have a scheduled search compare your search against the lookup and send an alert if there are less records.&lt;/P&gt;

&lt;P&gt;The other way would be to index (or append to a KVstore) the number/list of log files for each host and do the same scheduled search comparison.&lt;/P&gt;

&lt;P&gt;Basically, you'll need to decide if you want to compare against a master list, or compare against a previous ("normal") list of log files.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 15:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379315#M11387</guid>
      <dc:creator>jowenssi</dc:creator>
      <dc:date>2018-06-11T15:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379316#M11388</link>
      <description>&lt;P&gt;You can also use some multi search trickery. This isn't a solution to your problem, but is an example of what you can use to see the differences between two different time periods. Let's start with this example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| multisearch 
    [search index=main earliest=-2h@h latest=-1h@h
    |  eval type="foo" ] 
    [search index=main earliest=-1h@h latest=-0h@h
    |  eval type="bar"] 
| stats count by host, type 
| fields - count
| stats count by host
| search count=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is just taking the list of hosts from one hour and comparing to the list of hosts from another hour. The list is then counted by host names, and if there are less than two occurrences of a given host from the list, then it shows as a count of &lt;CODE&gt;1&lt;/CODE&gt; for that host, which is to be considered a single occurrence from the two time periods. This could be an extra one from either the first list or second, which list is not determined from this search, only that it exists in one, but not the other. This method doesn't require keeping a master list, or a summary search entry for the previous search.&lt;/P&gt;

&lt;P&gt;You would certainly have to modify this type of search to match your particular case. Without having some of your data to work with it isn't easy coming up with a complete solution.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 15:55:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379316#M11388</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-06-11T15:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379317#M11389</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/120445"&gt;@cpetterborg&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;I tried with lookup table. In lookup table I have mentioned all the three host and 279 sources.&lt;BR /&gt;
I used the below query but I am only getting three sources which are there in lookup but not in the splunk events but should be more than that.&lt;/P&gt;

&lt;P&gt;i am using the below query:&lt;/P&gt;

&lt;P&gt;|inputlookup source.csv | search NOT [ search index=auto_prod_cm_comparisions source=*cert_details.log earliest=-1m ] | dedup host,source|fields host,source&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:58:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379317#M11389</guid>
      <dc:creator>abhi04</dc:creator>
      <dc:date>2020-09-29T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379318#M11390</link>
      <description>&lt;P&gt;NOT and dedup are really expensive.  Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search index=auto_prod_cm_comparisions source=*cert_details.log earliest=-1m | stats count by host,source | fields host,source | append [inputlookup source.csv | stats count by host,source | fields host,source] | stats count by host, source | search count = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will give you the delta between the two and allow you to identify which sources are either extra or missing.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379318#M11390</guid>
      <dc:creator>jowenssi</dc:creator>
      <dc:date>2018-06-12T13:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if any one log file is missing from long list of files from same location?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379319#M11391</link>
      <description>&lt;P&gt;The log files have name starting with the time stamp. so the filename changes everyday.&lt;BR /&gt;
e.g. &lt;/P&gt;

&lt;P&gt;062118_0300_CAP_dfw1svpap504_cert_details.log&lt;BR /&gt;
062118_0300_CAP_dfw1svpap505_cert_details.log&lt;BR /&gt;
062118_0300_PROD_dfw1svpap507_cert_details.log&lt;BR /&gt;
062118_0300_PROD_sat1svmap536_cert_details.log&lt;BR /&gt;
062118_0300_PROD_sat1svmap538_cert_details.log&lt;BR /&gt;
062018_0200_CAP_dfw1svpap504_cert_details.log&lt;BR /&gt;
062018_0300_CAP_dfw1svpap505_cert_details.log&lt;BR /&gt;
062018_0250_PROD_dfw1svpap507_cert_details.log&lt;BR /&gt;
062018_0310_PROD_sat1svmap536_cert_details.log&lt;BR /&gt;
062018_0300_PROD_sat1svmap538_cert_details.log&lt;BR /&gt;
where "062018_0300" is date and time stamp.&lt;BR /&gt;
So I have taken only the portion "PROD_sat1svmap538_cert_details.log" for comparing. But then at last I have to add the date and time to the portion to display full file name for current day.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-create-an-alert-if-any-one-log-file-is-missing-from-long/m-p/379319#M11391</guid>
      <dc:creator>abhi04</dc:creator>
      <dc:date>2020-09-29T20:08:03Z</dc:date>
    </item>
  </channel>
</rss>

