<?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: Table not generated with join subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/563120#M196200</link>
    <description>&lt;P&gt;There are a few ways to use it.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;from&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;datamodel&lt;/FONT&gt; commands all support datamodels.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count as Events from datamodel=foo where earliest=-1h by SG mx_ip
| join SG 
[| tstats count where earliest=-720h latest=-1h by SG _time span=1h
| streamstats mean(count) as Average, stdev(count) as Deviation, max(count) as Peak by SG 
| dedup SG sortby -_time 
| eval Average = round(Average) 
| eval Variance = Deviation / Average] 
| where Events &amp;gt; (Average + (Deviation * (Variance + 10))) AND Events &amp;gt; (Average * 20) AND Events &amp;gt; 20000 AND Events &amp;gt; Peak AND Average &amp;gt; 50
| lookup mx2cx mx_ip
| table ServerGroup mx_ip cx Events Average&lt;/LI-CODE&gt;&lt;P&gt;If you accelerate the datamodel then the &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt; command should be very fast.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 19:59:10 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-08-12T19:59:10Z</dc:date>
    <item>
      <title>Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562131#M195495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We are sending a reduced size logs to out splunk to do some smarts. We realized for the past year or so one of our alerts is not working at all. Between that year we have upgraded splunk from 6.5.2 to latest 8.2.1 and also migrated it from the entire VM it sits on.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=clean_security_events earliest=-1h 
| stats count as Events by SG mx_ip
| join SG 
[search index=clean_security_events earliest=-720h latest=-1h 
| bin span=1h _time 
| stats count by SG _time 
| streamstats mean(count) as Average, stdev(count) as Deviation, max(count) as Peak by SG 
| dedup SG sortby -_time 
| eval Average = round(Average) 
| eval Variance = Deviation / Average] 
| where Events &amp;gt; (Average + (Deviation * (Variance + 10))) AND Events &amp;gt; (Average * 20) AND Events &amp;gt; 20000 AND Events &amp;gt; Peak AND Average &amp;gt; 50
| lookup mx2cx mx_ip
| table ServerGroup mx_ip cx Events Average&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The general idea is we send reduced security events from our app and use the above to determine if a given SG (hence the stat count as Events) is generating sudden high events compared to the last 30 days.&lt;BR /&gt;&lt;BR /&gt;Upon trial and error if I narrow down to one mx_ip out of the 100s it works. I suspect that the subsearch is either generating too many events or the result are taking too long for the parent search and as a result we are getting empty tables.&lt;BR /&gt;&lt;BR /&gt;Any idea how to fix this? My understanding is I can increase the limits but it is not recommended.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was thinking to use some ML toolkit to detect outlier and that way I can replace two alerts (one for sudden uptick and one for sudden downtick)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 21:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562131#M195495</guid>
      <dc:creator>vantoryc</dc:creator>
      <dc:date>2021-08-04T21:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562150#M195502</link>
      <description>&lt;P&gt;If SG is an indexed field then you can use | tstats to speed up the subsearch.&amp;nbsp; Also, consider an accelerated datamodel.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 00:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562150#M195502</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-05T00:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562792#M196101</link>
      <description>&lt;P&gt;any pointers to get the data model setup with my use case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm playing around right now but not much progress&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 18:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562792#M196101</guid>
      <dc:creator>vantoryc</dc:creator>
      <dc:date>2021-08-10T18:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562799#M196102</link>
      <description>&lt;P&gt;The datamodel needs to search the&amp;nbsp;clean_security_events index and produce the _time, SG, and mx_ip fields.&lt;/P&gt;&lt;P&gt;What do you have so far?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 19:08:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562799#M196102</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-10T19:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562808#M196103</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;Create data model just for the index&lt;/LI&gt;&lt;LI&gt;Extracted the SG and mx_ip filed&lt;/LI&gt;&lt;LI&gt;Went to pivot to get a table that shows the count by the SG per hour&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 20:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562808#M196103</guid>
      <dc:creator>vantoryc</dc:creator>
      <dc:date>2021-08-10T20:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562813#M196105</link>
      <description>&lt;P&gt;Back up a step.&amp;nbsp; DMs don't create tables.&amp;nbsp; Once you have a root search defined and fields extracted then save the DM and call it a day.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 21:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/562813#M196105</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-10T21:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/563110#M196195</link>
      <description>&lt;P&gt;Okay so I already have the DM, how does one go about utilizing it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I'm confused here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I found on my research, you create a DM and then you have to use it too , Im trying to find some practical examples on YT and other location but most of them are turning up empty.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 18:13:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/563110#M196195</guid>
      <dc:creator>vantoryc</dc:creator>
      <dc:date>2021-08-12T18:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/563120#M196200</link>
      <description>&lt;P&gt;There are a few ways to use it.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;from&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;datamodel&lt;/FONT&gt; commands all support datamodels.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count as Events from datamodel=foo where earliest=-1h by SG mx_ip
| join SG 
[| tstats count where earliest=-720h latest=-1h by SG _time span=1h
| streamstats mean(count) as Average, stdev(count) as Deviation, max(count) as Peak by SG 
| dedup SG sortby -_time 
| eval Average = round(Average) 
| eval Variance = Deviation / Average] 
| where Events &amp;gt; (Average + (Deviation * (Variance + 10))) AND Events &amp;gt; (Average * 20) AND Events &amp;gt; 20000 AND Events &amp;gt; Peak AND Average &amp;gt; 50
| lookup mx2cx mx_ip
| table ServerGroup mx_ip cx Events Average&lt;/LI-CODE&gt;&lt;P&gt;If you accelerate the datamodel then the &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt; command should be very fast.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 19:59:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/563120#M196200</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-12T19:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/565524#M197052</link>
      <description>&lt;P&gt;Hi Sorry got sidelined on other stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when I run the below command I do not get results, even if I remove either mx_ip or SG :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count as Events from datamodel=foo where earliest=-1h by SG mx_ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But just running a simple tstat gives me instant output like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count as Events from datamodel=foo where earliest=-1h&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm guessing my data model is wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What kind of dataset I need to add? root event or root search?&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;I tried both and only simple tstats is outputted&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Both times I then auto extracted the SG and mx_ip field. but set it to optional.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 17:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/565524#M197052</guid>
      <dc:creator>vantoryc</dc:creator>
      <dc:date>2021-09-01T17:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table not generated with join subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/565666#M197104</link>
      <description>&lt;P&gt;Using the &lt;FONT face="courier new,courier"&gt;by&lt;/FONT&gt; option of &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt; requires the datamodel to contain all of the fields specified.&amp;nbsp; They can be optional, but the field is not present then it won't be counted by &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 11:58:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-not-generated-with-join-subsearch/m-p/565666#M197104</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-09-02T11:58:30Z</dc:date>
    </item>
  </channel>
</rss>

