<?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: Getting logs for after hours access in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84551#M17565</link>
    <description>&lt;P&gt;Excellent.  Could you accept the answer please, by clicking on the checkbox to the left?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2012 16:04:46 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2012-10-09T16:04:46Z</dc:date>
    <item>
      <title>Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84546#M17560</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I want to be able to get logs from Splunk for anyone who came in to the building between 7PM and 7AM the next morning, and search back for the last 30 days but I'm having a difficult time finding out how to do it.&lt;/P&gt;

&lt;P&gt;I've tried this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" source="accesscontrol.csv" | timechart count by User
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it truncates it down to just a few users and adds the rest of the users as "other". I'd just like a table of all users who were in the building between those hours.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Ken&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84546#M17560</guid>
      <dc:creator>kengilmour</dc:creator>
      <dc:date>2012-10-09T14:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84547#M17561</link>
      <description>&lt;P&gt;Can you post an example of what is located in accesscontrol.csv?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84547#M17561</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2012-10-09T14:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84548#M17562</link>
      <description>&lt;P&gt;If you want a table, a &lt;CODE&gt;timechart&lt;/CODE&gt; is probably not the route you want to take.  You might want to do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" source="accesscontrol.csv" 
| eval access_hour=strftime(_time,"%H")
| where ( access_hour &amp;gt;= 19 OR access_hour &amp;lt; 7  ) 
| table _time,User
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Oct 2012 14:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84548#M17562</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-10-09T14:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84549#M17563</link>
      <description>&lt;P&gt;or directly date_hour.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index="main" source="accesscontrol.csv" (date_hour &amp;lt;7 OR date_hour&amp;gt;=19) &lt;BR /&gt;
| stats count values(date_hour) AS list_of_hours by User&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 15:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84549#M17563</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-10-09T15:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84550#M17564</link>
      <description>&lt;P&gt;That's excellent, thanks very much, it worked!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 15:09:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84550#M17564</guid>
      <dc:creator>kengilmour</dc:creator>
      <dc:date>2012-10-09T15:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84551#M17565</link>
      <description>&lt;P&gt;Excellent.  Could you accept the answer please, by clicking on the checkbox to the left?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2012 16:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84551#M17565</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-10-09T16:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting logs for after hours access</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84552#M17566</link>
      <description>&lt;P&gt;If I wanted to get the count per user would the following be correct:&lt;/P&gt;

&lt;P&gt;index="main" source=accesscontrol.csv" &lt;BR /&gt;
| eval access_hour=strftime(_time,"%H") | where ( access_hour &amp;gt;= 19 OR access_hour &amp;lt; 7  )&lt;BR /&gt;&lt;BR /&gt;
| table _time,User | top 10 User showperc=false&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Getting-logs-for-after-hours-access/m-p/84552#M17566</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2020-09-28T18:09:16Z</dc:date>
    </item>
  </channel>
</rss>

