<?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: Can you help me build a query which would generate a list of enabled usecases in Splunk Enterprise Security App along with the last triggered time? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386058#M4027</link>
    <description>&lt;P&gt;I mean the time when the search was executed and the notable was created.&lt;/P&gt;</description>
    <pubDate>Sat, 17 Nov 2018 03:11:57 GMT</pubDate>
    <dc:creator>KumarGB</dc:creator>
    <dc:date>2018-11-17T03:11:57Z</dc:date>
    <item>
      <title>Can you help me build a query which would generate a list of enabled usecases in Splunk Enterprise Security App along with the last triggered time?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386056#M4025</link>
      <description>&lt;P&gt;Hey Guys,&lt;/P&gt;

&lt;P&gt;Could anyone suggest me a query for the below scenario.&lt;/P&gt;

&lt;P&gt;I need a Splunk query to show the list of enabled usecases in Enterprise Security App along with the last triggered time of the usecase.&lt;/P&gt;

&lt;P&gt;To check the enabled usecases I'm using the below query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server=local count=0 /services/saved/searches
| search disabled=0 AND ( action.risk=1 OR action.notable=1 ) | table title
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Along with this, I need the last triggered time of the use case in the same table.&lt;/P&gt;

&lt;P&gt;Is it possible? if yes kindly help me by posting the query.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:48:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386056#M4025</guid>
      <dc:creator>KumarGB</dc:creator>
      <dc:date>2018-11-15T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query which would generate a list of enabled usecases in Splunk Enterprise Security App along with the last triggered time?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386057#M4026</link>
      <description>&lt;P&gt;when you say "triggered" do you mean the search was executed or you mean the search was executed and found a notable event?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 18:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386057#M4026</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-11-15T18:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query which would generate a list of enabled usecases in Splunk Enterprise Security App along with the last triggered time?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386058#M4027</link>
      <description>&lt;P&gt;I mean the time when the search was executed and the notable was created.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Nov 2018 03:11:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386058#M4027</guid>
      <dc:creator>KumarGB</dc:creator>
      <dc:date>2018-11-17T03:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query which would generate a list of enabled usecases in Splunk Enterprise Security App along with the last triggered time?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386059#M4028</link>
      <description>&lt;P&gt;you are half way there.&lt;BR /&gt;
you can check the last time a notable was created by querying the "notable" index, many options here to do so, examples:&lt;BR /&gt;
&lt;CODE&gt;index = notable | dedup search_name | table search_name _time&lt;/CODE&gt; &lt;BR /&gt;
&lt;CODE&gt;index = notable | stats max(_time) as last_notable by search_name&lt;/CODE&gt;&lt;BR /&gt;
note: pay attention also to the &lt;CODE&gt;source&lt;/CODE&gt; field in the notable index.&lt;/P&gt;

&lt;P&gt;now all it takes is to put both queries together, again, many ways to go here too, here is one example with &lt;CODE&gt;join&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="notable"
| dedup search_name 
| stats max(_time) as last_hit by search_name
| join  search_name [
                      | rest splunk_server=local count=0 /services/saved/searches
                      | search disabled=0 AND ( action.risk=1 OR action.notable=1 )
                      | rename title as search_name 
                      | table search_name
                    ]
| eval last_hit_human = strftime(last_hit, "%c")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;screenshot:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6085iE18BD896B27C2221/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 01:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386059#M4028</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-11-18T01:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me build a query which would generate a list of enabled usecases in Splunk Enterprise Security App along with the last triggered time?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386060#M4029</link>
      <description>&lt;P&gt;This Works Perfect. Thanks @adonio &lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 18:05:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Can-you-help-me-build-a-query-which-would-generate-a-list-of/m-p/386060#M4029</guid>
      <dc:creator>KumarGB</dc:creator>
      <dc:date>2018-11-18T18:05:44Z</dc:date>
    </item>
  </channel>
</rss>

