<?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: Why isn't my query working after adding timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340019#M100844</link>
    <description>&lt;P&gt;@ZigZaggin, if the above worked and you have fields &lt;CODE&gt;core.user_auth.login_failed&lt;/CODE&gt; and Total you can calculate the percent however, since the field has a dot &lt;CODE&gt;.&lt;/CODE&gt; you would need to escape the field name in &lt;CODE&gt;eval&lt;/CODE&gt; expression using single quotes &lt;CODE&gt;'&lt;/CODE&gt; i.e. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval failure_percent= round(('core.user_auth.login_failed'/Total)*100,1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I will be updating my answer, however the same eval should work for the other solution approach as well. Please try out and confirm!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 16:12:33 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-03-14T16:12:33Z</dc:date>
    <item>
      <title>Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340003#M100828</link>
      <description>&lt;P&gt;Greetings All - I have a query that gives me the data I need.   However when I tried to add a timechart function to bring it back in 10min blocks i get nothing?   I am new to Slunk queries and in the learning process so your expertise is greatly appreciated.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Query 1&lt;/STRONG&gt; (works as desired but only brings back results for the time specified using the "date time range" drop down in the upper right corner)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=okta host="domain.com"
| top action.objectType
| search action.objectType="core.user_auth.login_failed"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Query 2&lt;/STRONG&gt; (timechart added and no results ??)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=okta host="domain.com" earliest=-1d latest=now()
| top action.objectType
| search action.objectType="core.user_auth.login_failed" | timechart span=10m count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;your expertise and help is greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340003#M100828</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2018-03-12T16:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340004#M100829</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;If you check just the output of this part:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=okta host="domain.com"
 | top action.objectType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You'll see there is no _time field anymore, so timechart could not function without his base _time field.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340004#M100829</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-12T16:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340005#M100830</link>
      <description>&lt;P&gt;Hi ZigZaggin,&lt;BR /&gt;
timechart command needs the presence of _time field, when you use top command you have as result only action.objectType, count and perc, not _time, so you cannot use timechart after top command.&lt;BR /&gt;
In other words you have to build your search in different way, e.g. using something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=okta host="domain.com" earliest=-1d latest=now() action.objectType="core.user_auth.login_failed" 
| timechart span=10m count BY action.objectType limit=10 useother=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:30:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340005#M100830</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-03-12T16:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340006#M100831</link>
      <description>&lt;P&gt;Ok, thank you for your responses regarding inclusion of the time field.  I'll see what I can come up with.   The system won't let me post any example screenshots yet (karma points?).&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:52:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340006#M100831</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2018-03-12T16:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340007#M100832</link>
      <description>&lt;P&gt;In the first query I posted I get a field back with the percentage.   My overall goal is to implement that query so I can see what the login failure percentage was in 10min increments.   I need to do this to establish a baseline / threshold at which to set an alert to fire.   &lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 17:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340007#M100832</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2018-03-12T17:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340008#M100833</link>
      <description>&lt;P&gt;If you want &lt;STRONG&gt;what the login failure percentage was in 10min increments&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=okta host="domain.com" earliest=-1d latest=now() 
| timechart span=10m sum(eval(if(action.objectType=="core.user_auth.login_failed",1,0))) as failure_logins, count as total
| eval percentage=round(100*failure_logins/total,2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if it solves your issue&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 17:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340008#M100833</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-12T17:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340009#M100834</link>
      <description>&lt;P&gt;@ZigZaggin you can always use Image Sharing site to upload your image like &lt;CODE&gt;imgur&lt;/CODE&gt;, and then include a link to image using image &lt;CODE&gt;&amp;lt;img&amp;gt;&lt;/CODE&gt; icon or Ctrl+G to paste the URL to display image.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 17:57:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340009#M100834</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-12T17:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340010#M100835</link>
      <description>&lt;P&gt;This appears to be really close!  So Thank you TIAGOFBMM &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;   However, when I run the first query (posted in my intial question) with a top command on action.objectType and then do the search against the collection of items returned via the top command, it tells me the percentage of failed logins vs all other action.objectType events.  The latest query seems to only take into account failed logins so the percentage is always zero ?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:00:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340010#M100835</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2018-03-12T18:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340011#M100836</link>
      <description>&lt;P&gt;Hmm it should not be zero. Maybe it is zero because the percentage is too small and I rounded it to 2 decimal cases only.&lt;/P&gt;

&lt;P&gt;But I did not understand if you just want the percentage of failed logins the percentage splitted for all the values of action.objectType?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:19:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340011#M100836</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-12T18:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340012#M100837</link>
      <description>&lt;P&gt;[Updated Answer] To handle special character in the field name to be escaped for eval expression&lt;BR /&gt;
Following can be used as well, since only failed percent is required&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=okta host="domain.com" action.objectType=*
| timechart span=10m count by action.objectType limit=0 useother=f usenull=f
| addcoltotals col=f row=t
| eval failed_percent=round(('core.user_auth.login_failed_perc'/Total)*100,1)]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;@ZigZaggin try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=okta host="domain.com" action.objectType=*
| timechart span=10m count by action.objectType limit=0 useother=f usenull=f
| addcoltotals col=f row=t
| foreach * [eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;_perc"=round(('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/Total)*100,1)]
| fields - Total*
| table time *_perc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: &lt;BR /&gt;
1) The addition of &lt;CODE&gt;action.objectType=*&lt;/CODE&gt; in the base search ensures that only fields with the field &lt;CODE&gt;action.objectType&lt;/CODE&gt; are used for stats.&lt;BR /&gt;
2) &lt;CODE&gt;limit=0&lt;/CODE&gt; in the &lt;CODE&gt;timechart&lt;/CODE&gt; command should be used to account for all the &lt;CODE&gt;action.objectType&lt;/CODE&gt;.&lt;BR /&gt;
3) The &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Addcoltotals"&gt;addcoltotals&lt;/A&gt; command with &lt;CODE&gt;row=t&lt;/CODE&gt; and &lt;CODE&gt;col=f&lt;/CODE&gt; give the total of each row i.e. &lt;CODE&gt;10m&lt;/CODE&gt; time span.&lt;BR /&gt;
4) The &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Foreach"&gt;foreach&lt;/A&gt; command applies a template eval for each field&lt;BR /&gt;
5) If you just want to have a look at the failed login percent, the final &lt;CODE&gt;| table&lt;/CODE&gt; should have &lt;CODE&gt;core.user_auth.login_failed_perc&lt;/CODE&gt; instead of &lt;CODE&gt;*_perc&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table _time core.user_auth.login_failed_perc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:21:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340012#M100837</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-12T18:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340013#M100838</link>
      <description>&lt;P&gt;@ZigZaggin, @tiagofbmm, it should look like the following;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=okta host="domain.com" earliest=-1d@d latest=now() action.objectType=*
| timechart span=10m count(eval(action.objectType=="core.user_auth.login_failed")) as failed_login count as all_logins
| eval failed_login_percent=round((failed_login/all_logins)*100,1)
| fields - failed_login all_logins
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340013#M100838</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-12T18:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340014#M100839</link>
      <description>&lt;P&gt;Thank you soo much for all of your suggestions.   I have been working with all of them and unfortunately haven't achieved the end result just yet.   So..  here's what I can tell you....  If I run this query for the last &lt;STRONG&gt;60 minutes&lt;/STRONG&gt; (using the date/time/change dropdown)...&lt;/P&gt;

&lt;P&gt;index=okta host="domain.com"&lt;BR /&gt;
| top action.objectType&lt;BR /&gt;
| search action.objectType="core.user_auth.login_failed"&lt;/P&gt;

&lt;P&gt;I get a failure percentage of 3.08 percent.&lt;/P&gt;

&lt;P&gt;If I run the query below:  (changing "earliest" to 60min) i get all 0 percentage results?&lt;/P&gt;

&lt;P&gt;index=okta host="domain.com" earliest=-60m latest=now() action.objectType=*&lt;BR /&gt;
 | timechart span=10m count(eval(action.objectType=="core.user_auth.login_failed")) as failed_login count as all_logins&lt;BR /&gt;
 | eval failed_login_percent=round((failed_login/all_logins)*100,1)&lt;BR /&gt;
 | fields - failed_login all_logins&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:22:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340014#M100839</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2020-09-29T18:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340015#M100840</link>
      <description>&lt;P&gt;@ZigZaggin, the first query gives overall percentage of &lt;CODE&gt;failed logins&lt;/CODE&gt; for &lt;CODE&gt;60 min&lt;/CODE&gt; as compared with other &lt;CODE&gt;objectTypes&lt;/CODE&gt;. The second query breaks errors into 6 parts i.e. additional &lt;CODE&gt;results/6&lt;/CODE&gt; so it would come down to &lt;CODE&gt;0.5&lt;/CODE&gt; or less.&lt;/P&gt;

&lt;P&gt;Can you try to increase the precision or &lt;CODE&gt;round()&lt;/CODE&gt; function from &lt;CODE&gt;1 to 4&lt;/CODE&gt;?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval failed_login_percent=round((failed_login/all_logins)*100,4)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also can you just run the timechart command and see the count of Failed Logins every 10 min as compared to all logins?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=okta host="domain.com" earliest=-60m latest=now() action.objectType=*
| timechart span=10m count(eval(action.objectType=="core.user_auth.login_failed")) as failed_login count as all_logins
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similarly for my query test out the following and perform a manual failed percent per row using the Total column added in the end.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=okta host="domain.com" action.objectType=*
 | timechart span=10m count by action.objectType limit=0 useother=f usenull=f
 | addcoltotals col=f row=t
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 04:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340015#M100840</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-13T04:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340016#M100841</link>
      <description>&lt;P&gt;Hello and first of all thank you very much for your suggestions.   I didn't have time to work on this yesterday but am back it today.   here's where things are at.   I'm not exactly sure what's getting missed but something is...  &lt;/P&gt;

&lt;P&gt;My Base Query:  this query actually does show the accurate failed logins.   However, I have to manually set the time/date range.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Base Query:&lt;/STRONG&gt;  (ran with time range manually set to last 60 min)&lt;BR /&gt;
ndex=okta host="domain.com"&lt;BR /&gt;
| top action.objectType&lt;BR /&gt;
| search action.objectType="core.user_auth.login_failed"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;BR /&gt;
action.objectType  |  count  |  percent    (column headers)&lt;BR /&gt;
core.user_auth.login_failed  |  276  |  2.362205   (data)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Suggested Query just to see logins:&lt;/STRONG&gt; &lt;BR /&gt;
 index=okta host="domain.com" earliest=-60m latest=now() action.objectType=*&lt;BR /&gt;
 | timechart span=10m count(eval(action.objectType=="core.user_auth.login_failed")) as failed_login count as all_logins&lt;/P&gt;

&lt;P&gt;*&lt;EM&gt;Output:  (note that failed _login is always zero *&lt;/EM&gt;&lt;BR /&gt;
_time  |  failed_login  |  all_logins  (column headers)&lt;BR /&gt;
2018-03-14 09:00:00  |  0  |  93&lt;BR /&gt;&lt;BR /&gt;
2018-03-14 09:10:00  |  0  |  1941 &lt;BR /&gt;
2018-03-14 09:20:00  |  0  |  1891 &lt;BR /&gt;
2018-03-14 09:30:00  |  0  |  1757 &lt;BR /&gt;
2018-03-14 09:40:00  |  0  |  2089 &lt;BR /&gt;
2018-03-14 09:50:00  |  0  |  2219 &lt;BR /&gt;
2018-03-14 10:00:00  |  0  |  1385 &lt;/P&gt;

&lt;P&gt;I'm not exactly sure where to go from here but would love to get this solved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340016#M100841</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2020-09-29T18:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340017#M100842</link>
      <description>&lt;P&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt; - Query Below seems to capture failed logins correctly:&lt;/P&gt;

&lt;P&gt;index=okta host="domain.com" earliest=-60m latest=now() action.objectType="core.user_auth.login_failed" &lt;BR /&gt;
 | timechart span=10m count BY action.objectType limit=30 useother=0&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Returns Output&lt;/STRONG&gt;:&lt;BR /&gt;
_time  |  core.user_auth.login_failed  (column headers)&lt;BR /&gt;
2018-03-14 09:20:00  |  12&lt;BR /&gt;
2018-03-14 09:30:00  |  52&lt;BR /&gt;
2018-03-14 09:40:00  |  31&lt;BR /&gt;
2018-03-14 09:50:00  |  48&lt;BR /&gt;
2018-03-14 10:00:00  |  40&lt;BR /&gt;
2018-03-14 10:10:00  |  57&lt;BR /&gt;
2018-03-14 10:20:00  |  4&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340017#M100842</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2020-09-29T18:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340018#M100843</link>
      <description>&lt;P&gt;Update:  I adjusted the last query as follows and it appears to be grabbing what is needed:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Query:&lt;/STRONG&gt;&lt;BR /&gt;
index=okta host="domain.com" action.objectType=&lt;EM&gt;login&lt;/EM&gt;&lt;BR /&gt;
  | timechart span=10m count by action.objectType limit=0 useother=f usenull=f&lt;BR /&gt;
  | addcoltotals col=f row=t&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Output Returned:&lt;/STRONG&gt;&lt;BR /&gt;
_time  |  app.ldap.login.locked_account  |  app.ldap.login.success  |  app.ldap.login.unknown_failure  |  core.user_auth.login_failed   core.user_auth.login_success  |  Total&lt;BR /&gt;
2018-03-14 09:30:00  |  0  |  180  |  1  |  37  |  192  |  410&lt;BR /&gt;
2018-03-14 09:40:00  |  2  |  332  |  0  |  31  |  347  |  712&lt;BR /&gt;
2018-03-14 09:50:00  |  2  |  337  |  0  |  48  |  358  |  745&lt;BR /&gt;
2018-03-14 10:00:00  |  0  |  294  |  0  |  40  |  317  |  651&lt;BR /&gt;
2018-03-14 10:10:00  |  0  |  289  |  0  |  57  |  316  |  662&lt;BR /&gt;
2018-03-14 10:20:00  |  2  |  263  |  1  |  39  |  289  |  594&lt;BR /&gt;
2018-03-14 10:30:00  |  0  |  52    |  0  |  3    |    52  |  107&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340018#M100843</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2020-09-29T18:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340019#M100844</link>
      <description>&lt;P&gt;@ZigZaggin, if the above worked and you have fields &lt;CODE&gt;core.user_auth.login_failed&lt;/CODE&gt; and Total you can calculate the percent however, since the field has a dot &lt;CODE&gt;.&lt;/CODE&gt; you would need to escape the field name in &lt;CODE&gt;eval&lt;/CODE&gt; expression using single quotes &lt;CODE&gt;'&lt;/CODE&gt; i.e. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval failure_percent= round(('core.user_auth.login_failed'/Total)*100,1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I will be updating my answer, however the same eval should work for the other solution approach as well. Please try out and confirm!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 16:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340019#M100844</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-14T16:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340020#M100845</link>
      <description>&lt;P&gt;That did it !   Thank you so much Niketnilay  !    I've accepted your answer.   &lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 17:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340020#M100845</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2018-03-14T17:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my query working after adding timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340021#M100846</link>
      <description>&lt;P&gt;I mean this one did it!   Piping to the eval using the single quotes was the key.  Thanks again Niketnilay !&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 17:52:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-query-working-after-adding-timechart/m-p/340021#M100846</guid>
      <dc:creator>ZigZaggin</dc:creator>
      <dc:date>2018-03-14T17:52:52Z</dc:date>
    </item>
  </channel>
</rss>

