<?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 generate a search that determines inactivity of firewall rules? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315042#M94325</link>
    <description>&lt;P&gt;I performed the search, and had to make a few adjustments (no results from above search):&lt;/P&gt;

&lt;P&gt;| stats latest(_time) as Time by fwrule&lt;/P&gt;

&lt;P&gt;From here, I'm having issues with the eval function. My stats statement records 'Time' in epochtime, but I need to then find all rules that have had their latest 30 days before now. Any other ideas?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 21:25:15 GMT</pubDate>
    <dc:creator>elpfarr</dc:creator>
    <dc:date>2017-02-28T21:25:15Z</dc:date>
    <item>
      <title>How to generate a search that determines inactivity of firewall rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315039#M94322</link>
      <description>&lt;P&gt;I'm having issues creating a search that determines inactivity of firewall rules.  I'd like to determine if a firewall rule was seen 31+ days ago, but has not reported in the last 30 days. &lt;/P&gt;

&lt;P&gt;For example, if "fwrule=3001" was triggered 31 days ago, but not since, it should populate my report.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:59:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315039#M94322</guid>
      <dc:creator>elpfarr</dc:creator>
      <dc:date>2017-02-22T18:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that determines inactivity of firewall rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315040#M94323</link>
      <description>&lt;P&gt;What does your search look like so far? &lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 12:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315040#M94323</guid>
      <dc:creator>adayton20</dc:creator>
      <dc:date>2017-02-23T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that determines inactivity of firewall rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315041#M94324</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt;
| stats latest by fwrule as last_seen
| eval days_since = (now() - last_seen) / 86400 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 Feb 2017 17:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315041#M94324</guid>
      <dc:creator>troyward</dc:creator>
      <dc:date>2017-02-25T17:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that determines inactivity of firewall rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315042#M94325</link>
      <description>&lt;P&gt;I performed the search, and had to make a few adjustments (no results from above search):&lt;/P&gt;

&lt;P&gt;| stats latest(_time) as Time by fwrule&lt;/P&gt;

&lt;P&gt;From here, I'm having issues with the eval function. My stats statement records 'Time' in epochtime, but I need to then find all rules that have had their latest 30 days before now. Any other ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 21:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315042#M94325</guid>
      <dc:creator>elpfarr</dc:creator>
      <dc:date>2017-02-28T21:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that determines inactivity of firewall rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315043#M94326</link>
      <description>&lt;P&gt;When you do the eval and get the difference between now and the event date and then device that by 86400 that gives you the number of days since it fired.  Then just filter with the search command for days_since &amp;gt; 30&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 15:35:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315043#M94326</guid>
      <dc:creator>troyward</dc:creator>
      <dc:date>2017-03-01T15:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that determines inactivity of firewall rules?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315044#M94327</link>
      <description>&lt;P&gt;This search is working for me, I've validated the output and it's accurate. I can change "-30d" to whatever time frame the search should alert on.&lt;/P&gt;

&lt;P&gt;ex. "-7d" = displays rules that haven't fired in the last 7 days, but have before that&lt;/P&gt;

&lt;P&gt;I've set my time range to  "All Time." &lt;BR /&gt;
I'm open for comments on making this more efficient&lt;/P&gt;

&lt;PRE&gt;
 sourcetype="my_source" fwrule="*"
| stats latest(_time) as Time by fwrule
| where relative_time(now(), "-30d") &amp;gt; Time
| eval Last_seen=strftime(Time, "%m/%d/%y %H:%M:%S")
| fields - Time
| sort - Last_seen
&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Mar 2017 18:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-determines-inactivity-of-firewall/m-p/315044#M94327</guid>
      <dc:creator>elpfarr</dc:creator>
      <dc:date>2017-03-01T18:54:13Z</dc:date>
    </item>
  </channel>
</rss>

