<?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 timechart time with SLA in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244862#M72942</link>
    <description>&lt;P&gt;Still getting the above error message, anything else I can try?&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2016 19:47:50 GMT</pubDate>
    <dc:creator>clarksinthehill</dc:creator>
    <dc:date>2016-05-20T19:47:50Z</dc:date>
    <item>
      <title>How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244855#M72935</link>
      <description>&lt;P&gt;I'm trying to replicate the following graph (not based on splunk data) into splunk. &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/127247-10-05-2016-01-31-14.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;On Time Batch - Planned Time is equal to SLA.&lt;/P&gt;

&lt;P&gt;I'm using the following search:&lt;BR /&gt;
    sourcetype=foo job_status=completed | eval SLA="06:00 AM" | eval Date=strftime(_time, "%m-%d-%y") | eval EndTime=strftime(_time, "%H:%M %p") | table Date EndTime SLA&lt;IMG src="https://community.splunk.com/storage/temp/127247-10-05-2016-01-31-14.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244855#M72935</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2020-09-29T09:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244856#M72936</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=foo job_status=completed
| eval date_hourmin = strftime(_time, "%H%M")
| eval date_hourmin_SLA="0600"
| where date_hourmin &amp;lt;= date_hourmin_SLA
| append [| noop | stats count AS info_min_time | addinfo 
   | eval info_min_time=strftime(info_min_time, "%m/%d/%Y") 
   | eval info_max_time=strftime(info_max_time, "%m/%d/%Y") 
   | map search="| gentimes start=$info_min_time$ end=$info_max_time$ increment=1d" 
   | fields starttime
   | rename starttime AS _time
   | eval host="SLA Planned Time" 
   | eval date_hourmin="0600" ] 
| timechart span=1d avg(date_hourmin) BY host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 May 2016 18:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244856#M72936</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-10T18:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244857#M72937</link>
      <description>&lt;P&gt;Thanks for the reply, I am getting two errors with this. They are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'timechart' command: You must specify data field(s) to chart.

[subsearch]: [map]: command="gentimes", invalid literal for int() with base 10: '"1462298400.000"'. Traceback: Traceback (most recent call last): File "/opt/isv/splunk/etc/apps/search/bin/gentimes.py", line 66, in generateTimestamps starttime = getTime(startagostr) File "/opt/isv/splunk/etc/apps/search/bin/gentimes.py", line 35, in getTime daysago = int(val) ValueError: invalid literal for int() with base 10: '"1462298400.000"'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 May 2016 18:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244857#M72937</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-05-10T18:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244858#M72938</link>
      <description>&lt;P&gt;I updated my original answer; try it again.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 19:11:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244858#M72938</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-10T19:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244859#M72939</link>
      <description>&lt;P&gt;Thanks, getting closer.. Working on formatting Y Axis to show 2,4,6,8 and still trying to display SLA line on line graph.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 20:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244859#M72939</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-05-10T20:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244860#M72940</link>
      <description>&lt;P&gt;The SLA line is on the graph; it is the one with &lt;CODE&gt;host&lt;/CODE&gt; = &lt;CODE&gt;SLA Planned Time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 20:36:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244860#M72940</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-10T20:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244861#M72941</link>
      <description>&lt;P&gt;Hmmm, still not displaying. Maybe the subsearch error is causing it. Getting this..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[subsearch]: Unable to run query '| gentimes start = [|noop|stats count AS info_min_time | eval info_min_time="1462370400.000" | eval info_min_time=strftime(info_min_time, %m/%d/%Y)] end = [|noop|stats count AS info_max_time | eval info_max_time="1462975723.000" | eval info_max_time=strftime(info_max_time, %m/%d/%Y)] increment=1d | eval host="SLA Planned Time" | eval date_hourmin="0600"'.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 May 2016 14:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244861#M72941</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-05-11T14:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244862#M72942</link>
      <description>&lt;P&gt;Still getting the above error message, anything else I can try?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 19:47:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244862#M72942</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-05-20T19:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244863#M72943</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=foo job_status=completed | eval SLA=6.0 | eval Date=strftime(_time, "%m-%d-%y") | eval EndTime=strftime(_time, "%H.%M") | table Date EndTime SLA
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 May 2016 19:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244863#M72943</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-20T19:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244864#M72944</link>
      <description>&lt;P&gt;Wow - much easier. I added a sort to the date. I'll work with this some more.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 20:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244864#M72944</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-05-20T20:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244865#M72945</link>
      <description>&lt;P&gt;Guys, this works great for endTime and SLA which happen in them middle of the day, but whenever the SLA is at early hours (e.g. 1 AM), the graph would show missed cut-offs every day as a 11pm endTime is technically before the SLA but the graph will show it as way after the 1.0 mark. Any ideas?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 07:00:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244865#M72945</guid>
      <dc:creator>robettinger</dc:creator>
      <dc:date>2017-06-25T07:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to timechart time with SLA</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244866#M72946</link>
      <description>&lt;P&gt;Wow, I really borked that one.  I tested it this time; try the updated answer.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 23:08:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-timechart-time-with-SLA/m-p/244866#M72946</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-25T23:08:02Z</dc:date>
    </item>
  </channel>
</rss>

