<?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: Querying Access logs when access to these has been more than twice in Security</title>
    <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290097#M7736</link>
    <description>&lt;P&gt;Sorry Frank,&lt;/P&gt;

&lt;P&gt;Yes i want to know when a file is uploaded too like a log. I am using a panel to show me if any logs have stopped logging for some reason. &lt;/P&gt;

&lt;P&gt;So want a query to find out if for example a file/log logs once but then never logs again thats fine. i want to whitelist those. So some sort of counter i suppose. If a file doesnt log and it had been logging then show the amount of days it hasnt logged. &lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2018 14:00:15 GMT</pubDate>
    <dc:creator>colinmchugo</dc:creator>
    <dc:date>2018-02-19T14:00:15Z</dc:date>
    <item>
      <title>Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290093#M7732</link>
      <description>&lt;P&gt;Morning Guru's,&lt;/P&gt;

&lt;P&gt;I am looking for a script to show the number of days a log was last accessed. Ive got this working but the problem is its common for people to dump in a log that then is never accessed again and then this has to be whitelisted. &lt;/P&gt;

&lt;P&gt;So i am wondering if anyone knows how to only show a log/file that has been accessed more then twice in the last month please?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;

&lt;P&gt;Colin&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 10:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290093#M7732</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2018-02-19T10:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290094#M7733</link>
      <description>&lt;P&gt;What exactly do you mean by a log in this case? Can you perhaps share the query that you had so far?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 10:24:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290094#M7733</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-19T10:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290095#M7734</link>
      <description>&lt;P&gt;| metadata index=m type=sources &lt;BR /&gt;
| eval ageInDays = round((now()-lastTime)/86400) &lt;BR /&gt;
| where ageInDays &amp;gt; 0.99 AND ageInDays&amp;lt;170.00 &lt;BR /&gt;
| convert ctime(lastTime) &lt;BR /&gt;
| convert ctime(firstTime) &lt;BR /&gt;
| convert timeformat="%Y %D" mktime(ageInDays) &lt;BR /&gt;
| rename ageInDays as Days &lt;BR /&gt;
| sort by Days&lt;/P&gt;

&lt;P&gt;thanks alot&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 13:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290095#M7734</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2018-02-19T13:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290096#M7735</link>
      <description>&lt;P&gt;So that gives you a list of sources in that index, which have had events ingested in the past 1-170 days. I assume source in this case relates to what you called "log/file" in your question?&lt;/P&gt;

&lt;P&gt;What exactly do you mean with "accessed"? Because that metadata search will give you when latest events were received from a certain source (log/file). "Access" sounds like you want to know when someone last looked at it?&lt;/P&gt;

&lt;P&gt;Also, what exactly is your goal? In what sense do you want to whitelist certain sources?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 13:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290096#M7735</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-19T13:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290097#M7736</link>
      <description>&lt;P&gt;Sorry Frank,&lt;/P&gt;

&lt;P&gt;Yes i want to know when a file is uploaded too like a log. I am using a panel to show me if any logs have stopped logging for some reason. &lt;/P&gt;

&lt;P&gt;So want a query to find out if for example a file/log logs once but then never logs again thats fine. i want to whitelist those. So some sort of counter i suppose. If a file doesnt log and it had been logging then show the amount of days it hasnt logged. &lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 14:00:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290097#M7736</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2018-02-19T14:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290098#M7737</link>
      <description>&lt;P&gt;Right, so a file that was ingested once, but not again afterwards can be ignored, you want to list sources that have been ingesting for a while, but then suddenly stopped receiving new logs?&lt;/P&gt;

&lt;P&gt;Perhaps you could look at comparing last time and first time? If both are on the same day: ignore, otherwise include the item in the results and show the days since lasttime (as you already do)?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 14:11:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290098#M7737</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-19T14:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290099#M7738</link>
      <description>&lt;P&gt;Yes that sounds good, if it logs on the same day and doesn't log again then  we don't care. If it logs everyday for 7 days then suddenly stops count the amount of days it has stopped from. &lt;/P&gt;

&lt;P&gt;Can you assist with the query? thanks. &lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 16:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290099#M7738</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2018-02-19T16:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Access logs when access to these has been more than twice</title>
      <link>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290100#M7739</link>
      <description>&lt;P&gt;Based on our discussion in comments, I'd change your original query to filter for sources that had their last event on a different day then their first event (second and third line are the ones I added, I left the rest of your query as is):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata index=m type=sources 
| eval firstToLast=round((lastTime-firstTime)/86400)
| where firstToLast&amp;gt;1
| eval ageInDays = round((now()-lastTime)/86400) 
| where ageInDays &amp;gt; 0.99 AND ageInDays&amp;lt;170.00 
| convert ctime(lastTime) 
| convert ctime(firstTime) 
| convert timeformat="%Y %D" mktime(ageInDays) 
| rename ageInDays as Days 
| sort by Days
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Feb 2018 08:54:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Querying-Access-logs-when-access-to-these-has-been-more-than/m-p/290100#M7739</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-02-20T08:54:47Z</dc:date>
    </item>
  </channel>
</rss>

