<?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 Timechart with success and failure and failure/success percentage, grouped by Server in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354728#M104972</link>
    <description>&lt;P&gt;I've two patterns, say like this - "successPattern" and "failurePattern". I want to make a timechart comparing success vs failure and failure percentage, server wise. I've attached the expected output. Here host1, host2 are the servers, available with field name "host"&lt;/P&gt;

&lt;P&gt;Could someone please help ? &lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 09:15:38 GMT</pubDate>
    <dc:creator>pjtbasu</dc:creator>
    <dc:date>2017-09-22T09:15:38Z</dc:date>
    <item>
      <title>Timechart with success and failure and failure/success percentage, grouped by Server</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354728#M104972</link>
      <description>&lt;P&gt;I've two patterns, say like this - "successPattern" and "failurePattern". I want to make a timechart comparing success vs failure and failure percentage, server wise. I've attached the expected output. Here host1, host2 are the servers, available with field name "host"&lt;/P&gt;

&lt;P&gt;Could someone please help ? &lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 09:15:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354728#M104972</guid>
      <dc:creator>pjtbasu</dc:creator>
      <dc:date>2017-09-22T09:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with success and failure and failure/success percentage, grouped by Server</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354729#M104973</link>
      <description>&lt;P&gt;so you can't have a multi-tiered table, like you show in your example, in Splunk. The closest you can get is to name the columns with host1-failures, host1-success, etc.&lt;/P&gt;

&lt;P&gt;something like this might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|timechart span=1m count(successPattern) as success count(failurePattern) as failures by host|foreach failures* [eval failure_perc&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;='&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'+'success&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;')*100]|fields _time *host1 *host2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if your success/failures is in the same field, you'll need to adjust the timechart commands to use something like &lt;CODE&gt;count(eval(field="successPattern")) as success&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 13:48:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354729#M104973</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-09-22T13:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with success and failure and failure/success percentage, grouped by Server</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354730#M104974</link>
      <description>&lt;P&gt;Not getting fully. What will be at the start, before the time chart pipe ? To be clear, successPattern/failurePattern is not a field name, but rather a generic pattern, they may not even be in same field.&lt;/P&gt;

&lt;P&gt;For example successpattern is "functionName status is:0" and failurepattern is "functionname completed with error" . Also the value of host field changes according to the success/failure patterns and it's not limited to host1 and host2, so can't hard-code in the search. I'm trying to get a generic query.&lt;/P&gt;

&lt;P&gt;host1-success,host2-success columns are absolutely fine.&lt;/P&gt;

&lt;P&gt;Simply my requirement is, "provide server wise failure/success count and failure percentage, where 2 patterns for success and failure will be provided"&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 21:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354730#M104974</guid>
      <dc:creator>pjtbasu</dc:creator>
      <dc:date>2017-09-22T21:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with success and failure and failure/success percentage, grouped by Server</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354731#M104975</link>
      <description>&lt;P&gt;i would probably create a field called successPattern and one called failurePatten based on what you've outlined. I'm not sure if "funcationName status is:0" is from raw events, but let's say you can use that.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search|eval successPattern=if(like(_raw,"%functionName status is:0%"),1,null())|eval failurePattern=if(like(_raw,"%functionname completed with error%"),1,null())|timechart span=1m count(successPattern) as success count(failurePattern) as failures by host|foreach failures* [eval failure_perc&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;='&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'/('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'+'success&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;')*100]|fields _time *host1 *host2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Sep 2017 21:11:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-success-and-failure-and-failure-success/m-p/354731#M104975</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-09-22T21:11:56Z</dc:date>
    </item>
  </channel>
</rss>

