<?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: How to write a search to graph the duration scripts ran using &amp;quot;begin&amp;quot; and &amp;quot;finished&amp;quot; time fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187099#M53940</link>
    <description>&lt;P&gt;Your question is too vague but this should get you started:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "^\W+\w+\W+\w+(?&amp;lt;Report&amp;gt;\W+)\w+(?&amp;lt;BeginOrFinished&amp;gt;\W+)\w+(?&amp;lt;Procedure&amp;gt;.*)$" | where BeginOrFinished="Begin" | timechart ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 30 Jun 2015 18:20:01 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-06-30T18:20:01Z</dc:date>
    <item>
      <title>How to write a search to graph the duration scripts ran using "begin" and "finished" time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187098#M53939</link>
      <description>&lt;P&gt;Right now I have two different scripts: report scripts and procedure scripts. They have a begin and finished time. I am trying to create a graph using the time as the y-axis and the report as the x-axis and the procedure as x-axis on another graph. Example text would be...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2012-03-22 00:7:02,318 INFORMATION Begin Procedure Script
2012-03-22 00:8:02,318 INFORMATION FINISHED Procedure Script (0)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jun 2015 17:43:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187098#M53939</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-06-30T17:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to graph the duration scripts ran using "begin" and "finished" time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187099#M53940</link>
      <description>&lt;P&gt;Your question is too vague but this should get you started:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "^\W+\w+\W+\w+(?&amp;lt;Report&amp;gt;\W+)\w+(?&amp;lt;BeginOrFinished&amp;gt;\W+)\w+(?&amp;lt;Procedure&amp;gt;.*)$" | where BeginOrFinished="Begin" | timechart ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jun 2015 18:20:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187099#M53940</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-30T18:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to graph the duration scripts ran using "begin" and "finished" time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187100#M53941</link>
      <description>&lt;P&gt;Is there anything I clarify? But thank you for answering.. I will check what those commands do.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 19:31:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187100#M53941</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-06-30T19:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to graph the duration scripts ran using "begin" and "finished" time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187101#M53942</link>
      <description>&lt;P&gt;What exactly are you trying to chart?  I can guess but that is silly!  Just for grins, here are a few guesses with answers:&lt;/P&gt;

&lt;P&gt;To chart the number of jobs completed per Report per hour, do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex "^\W+\w+\W+\w+(?&amp;lt;Report&amp;gt;\W+)\w+(?&amp;lt;BeginOrFinished&amp;gt;\W+)\w+(?&amp;lt;Procedure&amp;gt;.*)$" | timechart span=1h count(eval(BeginOrFinished="FINISHED")) AS CompletedJobCount by Report
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To chart the number of jobs initiated per Procedure per minute, do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | rex "^\W+\w+\W+\w+(?&amp;lt;Report&amp;gt;\W+)\w+(?&amp;lt;BeginOrFinished&amp;gt;\W+)\w+(?&amp;lt;Procedure&amp;gt;.*)$" | timechart span=1m count(eval(BeginOrFinished="Begin")) AS InitiatededJobCount by Procedure
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2015 19:23:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187101#M53942</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T19:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to graph the duration scripts ran using "begin" and "finished" time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187102#M53943</link>
      <description>&lt;P&gt;I fixed a minor error (re-edited).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 19:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-graph-the-duration-scripts-ran-using/m-p/187102#M53943</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T19:23:59Z</dc:date>
    </item>
  </channel>
</rss>

