<?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: How to Monitor missing sourcetypes/hosts in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/537724#M90111</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/110769"&gt;@Sahr_Lebbie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use your dashboard but get errors in inline panels&lt;/P&gt;&lt;P&gt;Do you have a working version?&lt;/P&gt;&lt;P&gt;RZ&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 21:03:14 GMT</pubDate>
    <dc:creator>RashidZamanDC</dc:creator>
    <dc:date>2021-01-28T21:03:14Z</dc:date>
    <item>
      <title>How to monitor missing sourcetypes/hosts?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135122#M27813</link>
      <description>&lt;P&gt;I was tasked with the job to monitor our endless amounts of sourcetypes and sourcetypes per host to be alerted when one went missing for an extended period of time. Does anyone have a simple query that they use that does this, or does anyone have a technique for keeping track of all the combinations or sourcetype &amp;amp; host.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 22:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135122#M27813</guid>
      <dc:creator>JoeSco27</dc:creator>
      <dc:date>2023-05-17T22:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135123#M27814</link>
      <description>&lt;P&gt;Running on Splunk Version 6.1.1 (will be upgrading to 6.1.5 shortly)&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 19:49:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135123#M27814</guid>
      <dc:creator>JoeSco27</dc:creator>
      <dc:date>2015-02-10T19:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135124#M27815</link>
      <description>&lt;P&gt;The deeper problem here is "how to define the complete expected list of sourcetypes and hosts".&lt;/P&gt;

&lt;P&gt;For example, you could run a search over all time and report "what sourcetype/host combinations have been seen at any time in the past, but not at any time in the last 24 hours." But that isn't an efficient report, and it could miss a new host that has never reported its sourcetypes as desired.&lt;/P&gt;

&lt;P&gt;So I see two main solutions:&lt;/P&gt;

&lt;P&gt;Brute force: Search over all time -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=*
| eval recent=if(_time&amp;gt;(now()-86400),1,0)
| stats count(recent==1) as CurrentCount count(recent==0) as HistoricalCount by sourcetype host
| eval status=case(CurrentCount &amp;gt; 0 and HistoricalCount &amp;gt; 0,"okay",
               CurrentCount &amp;lt; 1 and HistoricalCount &amp;gt; 0,"MISSING",
               CurrentCount &amp;gt; 0,"New")
| table sourcetype host status CurrentCount HistoricalCount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could even put a command like &lt;CODE&gt;| where HistoricalCount &amp;gt; 0&lt;/CODE&gt; if you don't want to report on the whole list.&lt;/P&gt;

&lt;P&gt;Much faster: Use a lookup table -&lt;/P&gt;

&lt;P&gt;Set up a lookup table. (You could even create the initial lookup table by running a search and saving the output as a csv file.) &lt;/P&gt;

&lt;P&gt;CSV file example:&lt;BR /&gt;&lt;BR /&gt;
sourcetype,host &lt;BR /&gt;
access_combined,web1 &lt;BR /&gt;
linux_secure,web1 &lt;/P&gt;

&lt;P&gt;Now your search can simply run over the last 24 hours (or two hours or whatever) and find anything that should have reported in, but has not:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup yourlookup 
| eval count = 0
| join type=outer sourcetype host [ search index=* 
        | stats count by sourcetype host ]
| where count == 0
| table sourcetype host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will list only the sourcetype and host combinations that have not appeared in the last timeframe. It should run very quickly compared to the first search. Leave out the &lt;CODE&gt;| where&lt;/CODE&gt; command if you want to see the entire list. Remember to keep your lookup table up-to-date. Whenever you update inputs.conf on a host, check to make certain whether you also need to edit your lookup table!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135124#M27815</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T18:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135125#M27816</link>
      <description>&lt;P&gt;My personal method (&lt;A href="http://answers.splunk.com/answers/78628/a-solution-for-tracking-hosts-that-stop-logging.html"&gt;link&lt;/A&gt;). It is very similar to the second thing lguinn posted. 2 step process where you build a lookup as step 1 and then run a second query over the lookup. &lt;/P&gt;

&lt;P&gt;The gist is:  query | get current time | append to csv | take max time for each host/st pair | discard logs that haven't logged for X number of days | output lookup. Then have a second query to look for logs with a "last_seen" greater than however many hours. I have the first query run twice as often as I alert (4hrs / 8hrs). One of the main reasons I did this is if someone decommissions a server I can remove the host entries in the lookup and the person/group doesn't get spammed every 8 hours for 4 days.&lt;/P&gt;

&lt;P&gt;You could use metadata or metasearch but there are issues with both - not the least of which within a small period of time Splunk will stop tracking host and source if there are more than 2k combinations of host/source/sourcetype. &lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 23:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135125#M27816</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2015-02-10T23:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135126#M27817</link>
      <description>&lt;P&gt;Enhancement post from the future &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Replace the second search with this &lt;CODE&gt;tstats&lt;/CODE&gt; search to get lighting fast search performance :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup YourLookupHere 
| eval count = 0 
| join type=outer sourcetype host 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ | tstats count(sourcetype) AS count 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WHERE index=_internal OR index=* by sourcetype host&amp;nbsp;&amp;nbsp;] 
| where count == 0
|&amp;nbsp;&amp;nbsp;table host sourcetype | sort host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 19:14:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135126#M27817</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-06-27T19:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135127#M27818</link>
      <description>&lt;P&gt;This has been solved many times including:&lt;BR /&gt;
Meta Woot!: &lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;https://splunkbase.splunk.com/app/2949/&lt;/A&gt;&lt;BR /&gt;
TrackMe: &lt;A href="https://splunkbase.splunk.com/app/4621/"&gt;https://splunkbase.splunk.com/app/4621/&lt;/A&gt;,&lt;BR /&gt;
Broken Hosts App for Splunk: &lt;A href="https://splunkbase.splunk.com/app/3247/"&gt;https://splunkbase.splunk.com/app/3247/&lt;/A&gt;&lt;BR /&gt;
Alerts for Splunk Admins ("ForwarderLevel" alerts): &lt;A href="https://splunkbase.splunk.com/app/3796/"&gt;https://splunkbase.splunk.com/app/3796/&lt;/A&gt;&lt;BR /&gt;
Splunk Security Essentials(&lt;A href="https://docs.splunksecurityessentials.com/features/sse_data_availability/):"&gt;https://docs.splunksecurityessentials.com/features/sse_data_availability/):&lt;/A&gt; &lt;A href="https://splunkbase.splunk.com/app/3435/"&gt;https://splunkbase.splunk.com/app/3435/&lt;/A&gt;&lt;BR /&gt;
Monitoring Console: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/DMC/Configureforwardermonitoring"&gt;https://docs.splunk.com/Documentation/Splunk/latest/DMC/Configureforwardermonitoring&lt;/A&gt;&lt;BR /&gt;
Deployment Server: &lt;A href="https://docs.splunk.com/Documentation/DepMon/latest/DeployDepMon/Troubleshootyourdeployment#Forwarder_warnings"&gt;https://docs.splunk.com/Documentation/DepMon/latest/DeployDepMon/Troubleshootyourdeployment#Forwarder_warnings&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 09:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135127#M27818</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-01-07T09:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135128#M27819</link>
      <description>&lt;P&gt;Here is a plug and play dashboard I am experimenting with if someone wants to try something quickly.&lt;/P&gt;

&lt;P&gt;Data Investigation Dashboard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="time" token="time" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Select Time Range&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;
    &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
  &amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="radio" token="variance" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Time Differnce Variance&amp;lt;/label&amp;gt;
  &amp;lt;choice value="|search dataTimeMissing=*"&amp;gt;Seconds&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="|eval dataTimeMissing=dataTimeMissing/60"&amp;gt;Minutes&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="|eval dataTimeMissing=dataTimeMissing/3600"&amp;gt;Hours&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="|eval dataTimeMissing=dataTimeMissing/86400"&amp;gt;Days&amp;lt;/choice&amp;gt;
  &amp;lt;default&amp;gt;|search dataTimeMissing=*&amp;lt;/default&amp;gt;
  &amp;lt;initialValue&amp;gt;|search dataTimeMissing=*&amp;lt;/initialValue&amp;gt;
&amp;lt;/input&amp;gt;


&amp;lt;panel&amp;gt;
  &amp;lt;html&amp;gt;

  &amp;lt;center&amp;gt;
      &amp;lt;h1&amp;gt;SOC Data Investigation Dashboard&amp;lt;/h1&amp;gt;
  &amp;lt;p&amp;gt;This dashboard is used to anlayze the flow of data into Splunk and measure the cosistency of data ingestion. Please pay attention to the time difference as it can be in seconds, minutes, hours, or days.&amp;lt;/p&amp;gt;
  &amp;lt;/center&amp;gt;
&amp;lt;/html&amp;gt;
&amp;lt;/panel&amp;gt;


&amp;lt;panel&amp;gt;
  &amp;lt;title&amp;gt;Data Investigation Dashboard&amp;lt;/title&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;|metadata type=sourcetypes index=* |eval timeNow=now() |eval dataTimeMissing=timeNow - recentTime |convert ctime(recentTime) ctime(timeNow) ctime(firstTime) |fields sourcetype totalCount firstTime recentTime timeNow dataTimeMissing |sort - dataTimeMissing $variance$&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
      &amp;lt;refresh&amp;gt;2m&amp;lt;/refresh&amp;gt;
      &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
    &amp;lt;option name="rowNumbers"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;format type="color" field="dataTimeMissing"&amp;gt;
      &amp;lt;colorPalette type="minMidMax" maxColor="#DC4E41" minColor="#FFFFFF"&amp;gt;&amp;lt;/colorPalette&amp;gt;
      &amp;lt;scale type="minMidMax"&amp;gt;&amp;lt;/scale&amp;gt;
    &amp;lt;/format&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Apr 2020 15:58:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135128#M27819</guid>
      <dc:creator>Sahr_Lebbie</dc:creator>
      <dc:date>2020-04-09T15:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135129#M27820</link>
      <description>&lt;P&gt;Nothing is as fast as a simple query like &lt;STRONG&gt;tstats&lt;/STRONG&gt; and for users who cannot go installing the third party apps can always use the below code for reference. Also this will help you to identify the retention period of indexes along with source, sourcetype, host, etc. &lt;/P&gt;

&lt;P&gt;| tstats  earliest(&lt;EM&gt;time) as earliestTime latest(_time) as latestTime count as eventCount  where index=&lt;/EM&gt;*  by source sourcetype host index splunk_server |eval" retention period days"=round((latestTime-earliestTime)/86400,2)|convert ctime(*Time)&lt;/P&gt;

&lt;P&gt;| dbinspect index=*&lt;BR /&gt;
&amp;nbsp;| stats count as bucket_count min(startEpoch) as earliest_event by index splunk_server&lt;BR /&gt;
&amp;nbsp;| eval earliest_event_human = strftime(earliest_event, "%c")&lt;/P&gt;

&lt;P&gt;Do also check out Avotrix app on splunkbase.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/135129#M27820</guid>
      <dc:creator>VSIRIS</dc:creator>
      <dc:date>2020-09-30T04:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/537724#M90111</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/110769"&gt;@Sahr_Lebbie&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use your dashboard but get errors in inline panels&lt;/P&gt;&lt;P&gt;Do you have a working version?&lt;/P&gt;&lt;P&gt;RZ&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/537724#M90111</guid>
      <dc:creator>RashidZamanDC</dc:creator>
      <dc:date>2021-01-28T21:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/643691#M109649</link>
      <description>&lt;P&gt;Sorry to ask questions on such an old post but interested in this piece of code but not sure that it is working correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| stats count(recent==1) as CurrentCount count(recent==0) as HistoricalCount by sourcetype host&lt;/PRE&gt;&lt;P&gt;I would have expected to get a bunch of results where CurrentCount and HistoricalCount are greater than 0.&lt;/P&gt;&lt;P&gt;When I modified this to look at my data I get zeros for Current and Historical counts ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 20:49:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/643691#M109649</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2023-05-17T20:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Monitor missing sourcetypes/hosts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/643699#M109651</link>
      <description>&lt;P&gt;Shortly after I posted this I made a change to the one line in question to add eval(recent=1) and eval(recent=0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| stats count(eval(recent=1)) as CurrentCount count(eval(recent=0)) as HistoricalCount by sourcetype host&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now getting the results that I expected.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 21:10:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-monitor-missing-sourcetypes-hosts/m-p/643699#M109651</guid>
      <dc:creator>sjringo</dc:creator>
      <dc:date>2023-05-17T21:10:25Z</dc:date>
    </item>
  </channel>
</rss>

