<?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 Access Granted/Denied query in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360575#M6248</link>
    <description>&lt;P&gt;Hi, I have the following table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time usernameOK
_time usernameFail

example:

2017-09-28 00:10:00 usernameOK=robE
2017-09-28 01:10:20 usernameFail=jonasH
2017-09-28 02:20:23 usernameOK=timN
2017-09-28 02:20:35 usernameOK=robE
2017-09-28 02:30:46 usernameOK=robE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically I am trying to get the count of BOTH usernameOK and usernameFAIL, by time (bucketed 1h) by user, akin to a pivot table but my count command is coming back with an error ... Any ideas?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 08:47:13 GMT</pubDate>
    <dc:creator>robettinger</dc:creator>
    <dc:date>2017-09-28T08:47:13Z</dc:date>
    <item>
      <title>Access Granted/Denied query</title>
      <link>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360575#M6248</link>
      <description>&lt;P&gt;Hi, I have the following table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time usernameOK
_time usernameFail

example:

2017-09-28 00:10:00 usernameOK=robE
2017-09-28 01:10:20 usernameFail=jonasH
2017-09-28 02:20:23 usernameOK=timN
2017-09-28 02:20:35 usernameOK=robE
2017-09-28 02:30:46 usernameOK=robE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically I am trying to get the count of BOTH usernameOK and usernameFAIL, by time (bucketed 1h) by user, akin to a pivot table but my count command is coming back with an error ... Any ideas?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 08:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360575#M6248</guid>
      <dc:creator>robettinger</dc:creator>
      <dc:date>2017-09-28T08:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Access Granted/Denied query</title>
      <link>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360576#M6249</link>
      <description>&lt;P&gt;Hi robettinger,&lt;BR /&gt;
try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index (usernameOK=* OR usernameFail=*)
| eval type=if(usernameOK=*,"OK","Fail")
| stats count by type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 09:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360576#M6249</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-28T09:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Access Granted/Denied query</title>
      <link>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360577#M6250</link>
      <description>&lt;P&gt;Hi Giuseppe, I am afraid the query won't solve my problem.&lt;/P&gt;

&lt;P&gt;I would like to see a pivot-like table, grouping which users access at what time (this can be a time bucket of 1h)  and what users fail at what time (also a time bucket). This needs to be grouped by user. In the example above, the following data should be provided:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;range           Users OK         Users Fail
00:00-01:00      robE
01:00 - 02:00                       jonasH
02:00 - 03:00    robE, timN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It can also be multi-value...&lt;/P&gt;

&lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 10:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360577#M6250</guid>
      <dc:creator>robettinger</dc:creator>
      <dc:date>2017-09-28T10:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Access Granted/Denied query</title>
      <link>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360578#M6251</link>
      <description>&lt;P&gt;Hi robettinger,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index (usernameOK=* OR usernameFail=*)
| eval type=if(usernameOK=*,"OK","Fail"), username=coalesce(usernameOK,usernameFail)
| stats count by type username
| bin count span=1
| chart values(username) AS username over count by type
| nomv usernameOK
| nomv usernameFail
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 11:10:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Access-Granted-Denied-query/m-p/360578#M6251</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-28T11:10:22Z</dc:date>
    </item>
  </channel>
</rss>

