<?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: Multiple timechart counts in one search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172613#M49490</link>
    <description>&lt;P&gt;you could try&lt;BR /&gt;
index=nexus RNA-IVS |  rex field=_raw ".&lt;EM&gt;login (?\s+).&lt;/EM&gt;" | timechart count by logstate&lt;/P&gt;

&lt;P&gt;make to regexp to match your fields&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2015 08:50:22 GMT</pubDate>
    <dc:creator>FritzWittwer_ol</dc:creator>
    <dc:date>2015-08-13T08:50:22Z</dc:date>
    <item>
      <title>Multiple timechart counts in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172609#M49486</link>
      <description>&lt;P&gt;Hey Guys, i have spent all day trying to do this:&lt;/P&gt;

&lt;P&gt;So this search:&lt;/P&gt;

&lt;P&gt;index=nexus RNA-IVS "login failed" | timechart count&lt;/P&gt;

&lt;P&gt;provides me with &lt;/P&gt;

&lt;P&gt;date    count&lt;BR /&gt;
mon    8 &lt;BR /&gt;
tue       5&lt;BR /&gt;
wed     3&lt;/P&gt;

&lt;P&gt;Its counting all results with the string "login failed". &lt;/P&gt;

&lt;P&gt;NOW, what i need is it to do two string counts of different words so i get this result:&lt;/P&gt;

&lt;P&gt;date    count1 (login failed)   count2 (passed)&lt;BR /&gt;
mon       8                                     3&lt;BR /&gt;
tue          5                                      2&lt;BR /&gt;
wed        3                                     3&lt;/P&gt;

&lt;P&gt;please assist &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 05:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172609#M49486</guid>
      <dc:creator>nanomatical</dc:creator>
      <dc:date>2015-08-13T05:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple timechart counts in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172610#M49487</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nexus RNA-IVS "login failed" OR passed
| eval status = if(match(_raw,"(?i)login failed"),"Login failed","Passed")
| timechart count by status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to do this for more fields, that is possible. You could have multiple &lt;CODE&gt;eval&lt;/CODE&gt; statements with different criteria. As long as you assign the appropriate value to &lt;CODE&gt;status&lt;/CODE&gt;, the above will work.&lt;/P&gt;

&lt;P&gt;However, I think you should consider creating some eventtypes for your data. This would let you categorize the information in a number of ways. Let's say that you named your eventtypes &lt;CODE&gt;RNA_login_failed&lt;/CODE&gt;, &lt;CODE&gt;RNA_login_success&lt;/CODE&gt;, &lt;CODE&gt;RNA_connection_started&lt;/CODE&gt; etc. Now your search would be very simple (and flexible):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nexus RNA-IVS eventtype=RNA*
| timechart count by eventtype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And if in the future you create more &lt;CODE&gt;RNA*&lt;/CODE&gt; eventtypes, this search will automatically pick them up.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/view/SP-CAAAGYK"&gt;Video tutorial on eventtypes&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Knowledge/Abouteventtypes"&gt;Docs on eventtypes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 05:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172610#M49487</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-08-13T05:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple timechart counts in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172611#M49488</link>
      <description>&lt;P&gt;Thanks for this, it works great, however can i add more than two fields also? I need about four&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 06:18:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172611#M49488</guid>
      <dc:creator>nanomatical</dc:creator>
      <dc:date>2015-08-13T06:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple timechart counts in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172612#M49489</link>
      <description>&lt;P&gt;How i wish somebody would answer &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:13:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172612#M49489</guid>
      <dc:creator>nanomatical</dc:creator>
      <dc:date>2015-08-13T07:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple timechart counts in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172613#M49490</link>
      <description>&lt;P&gt;you could try&lt;BR /&gt;
index=nexus RNA-IVS |  rex field=_raw ".&lt;EM&gt;login (?\s+).&lt;/EM&gt;" | timechart count by logstate&lt;/P&gt;

&lt;P&gt;make to regexp to match your fields&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 08:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172613#M49490</guid>
      <dc:creator>FritzWittwer_ol</dc:creator>
      <dc:date>2015-08-13T08:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple timechart counts in one search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172614#M49491</link>
      <description>&lt;P&gt;We do this for free... and in the middle of the night in my timezone... just sayin'&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 16:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-timechart-counts-in-one-search/m-p/172614#M49491</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-08-13T16:56:30Z</dc:date>
    </item>
  </channel>
</rss>

