<?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 edit my timechart search to create a vertical line? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323168#M96441</link>
    <description>&lt;P&gt;Give these a try&lt;/P&gt;

&lt;P&gt;1)  Showing a spike (test) for the max value of count) and using line chart&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=myindex ALARM="ALARM" [| gentimes start=-1 | eval earliest = relative_time(1487771030,"-15m") | eval latest = relative_time(1487771030,"+5m") | return earliest, latest]  | timechart count  | eventstats max(count) as test | eval test=if(count=test, test,null) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Same search as above, but use &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Chartcontrols#Chart_overlay_example_.28single_axis.29"&gt;chart overlay&lt;/A&gt; , and use column chart visualization with count as overlay field (for line chart). &lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 21:43:06 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-02-22T21:43:06Z</dc:date>
    <item>
      <title>How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323167#M96440</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I need to create a vertical line in a time chart.&lt;BR /&gt;
I thought that I could use the following search to draw the vertical line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ALARM="ALARM" [| gentimes start=-1 | eval earliest = relative_time(1487771030,"-15m") | eval latest = relative_time(1487771030,"+5m") | return earliest, latest]  | timechart count  | eval test=if(_time==1487771030,100,10) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that produces the following chart:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2538i6AA9D25A83DB6DE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I was expecting to see a vertical line at 1487771030&lt;/P&gt;

&lt;P&gt;Of course, in the final search,  the last part should be like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval test=if(_time==1487771030,MAX,0) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously this is not working.&lt;BR /&gt;
The next question is "How can I calculate the MAX"&lt;BR /&gt;
In this solution (if I will able to reach what I'm looking for) there is the following problem: The "test" line will be visible even when the _time is not equal to 1487771030 &lt;/P&gt;

&lt;P&gt;is there a better way to draw a vertical line in a time chart?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;

&lt;P&gt;(I'm using Splunk 6.5)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 20:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323167#M96440</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-22T20:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323168#M96441</link>
      <description>&lt;P&gt;Give these a try&lt;/P&gt;

&lt;P&gt;1)  Showing a spike (test) for the max value of count) and using line chart&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=myindex ALARM="ALARM" [| gentimes start=-1 | eval earliest = relative_time(1487771030,"-15m") | eval latest = relative_time(1487771030,"+5m") | return earliest, latest]  | timechart count  | eventstats max(count) as test | eval test=if(count=test, test,null) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) Same search as above, but use &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Chartcontrols#Chart_overlay_example_.28single_axis.29"&gt;chart overlay&lt;/A&gt; , and use column chart visualization with count as overlay field (for line chart). &lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 21:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323168#M96441</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-22T21:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323169#M96442</link>
      <description>&lt;P&gt;To follow on to Somesoni2's solution, put the chart in a dashboard then edit the XML to include the below.  This way the column isn't as wide and it looks more like a vertical line&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.chart.columnSpacing"&amp;gt;100&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 21:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323169#M96442</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-02-22T21:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323170#M96443</link>
      <description>&lt;P&gt;Thank you for you answer but I think that I don't explained myself well because this is not exactly what I'm looking for.&lt;/P&gt;

&lt;P&gt;What I'm trying is to create a VerticalLine, or a point, or a Mark at a specific TimeStamp of the chart.&lt;/P&gt;

&lt;P&gt;In this case I want a Vertical Line ( if it is not possible a visible point/mark on the graph should be ok) at ** 1487771030** (the time interval of my query is from 1487771030 -15minutes, 1487771030+5minutes)&lt;/P&gt;

&lt;P&gt;I talk about Max because to draw the Vertical Line should be at 1487771030 (X-axes) with  MAX count (in y-axes)&lt;BR /&gt;
In your solution I saw a point corresponding at the MAX Count value.&lt;/P&gt;

&lt;P&gt;check the follow image:&lt;BR /&gt;
&lt;IMG src="https://dl.dropboxusercontent.com/u/3244719/Screen%20Shot%202017-02-23%20at%2008.58.14.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 08:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323170#M96443</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T08:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323171#M96444</link>
      <description>&lt;P&gt;I noticed if I use this query :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ALARM="ALARM" [| gentimes start=-1 | eval earliest = relative_time(1487770130,"-15m") | eval latest = relative_time(1487770130,"+1m") | return earliest, latest] | timechart count  | eventstats max(count) as Fault | eval Fault=if(_time=1487770130, Fault,null)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2537iE979988BF3FE0E18/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I saw what I want (the yellow point at 1487770130), &lt;STRONG&gt;but&lt;/STRONG&gt; if I change, for example, the latest time&lt;BR /&gt;
 from &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;eval latest =relative_time(1487770130,"+1m")   &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;to &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;eval latest =relative_time(1487770130,"+5m") &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The yellow point disappear. Does anyone knows why? &lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323171#M96444</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T14:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323172#M96445</link>
      <description>&lt;P&gt;Thanks for your comment. Do you also have an Idea to how solve my problem?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:58:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323172#M96445</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T14:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323173#M96446</link>
      <description>&lt;P&gt;Give this a try then&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ALARM="ALARM" [| gentimes start=-1 | eval earliest = relative_time(1487771030,"-15m") | eval latest = relative_time(1487771030,"+5m") | return earliest, latest]  | timechart count  
| appendpipe [| stats max(count) as test | eval _time=1487771030]
| sort _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:14:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323173#M96446</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-23T15:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323174#M96447</link>
      <description>&lt;P&gt;Somesoni2's query should meet your needs&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:21:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323174#M96447</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-02-23T15:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323175#M96448</link>
      <description>&lt;P&gt;This is what I want but there is a problem, a line is missing, check the picture.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3244719/Screen%20Shot%202017-02-23%20at%2016.25.57.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;If I remove "| appendpipe ..." the graph is drawn right but, of course, there isn't  the test point.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323175#M96448</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T15:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323176#M96449</link>
      <description>&lt;P&gt;As I wrote in the comments, it isn't. &lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323176#M96449</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T15:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323177#M96450</link>
      <description>&lt;P&gt;If Somesoni2 can't help then I doubt anyone else will be able to.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323177#M96450</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-02-23T15:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323178#M96451</link>
      <description>&lt;P&gt;Make the overlay a column chart&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323178#M96451</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-02-23T15:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323179#M96452</link>
      <description>&lt;P&gt;I guess the problem is that your timestamp 1487771030  is not matching any of the _time value after timechart (span is not specified or even if specified, may not match 1487771030 ). In the Chart Format options, In General section, select 'Null Values' as 'Connect'.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:43:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323179#M96452</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-23T15:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323180#M96453</link>
      <description>&lt;P&gt;It was already an overlay&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:47:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323180#M96453</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T15:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my timechart search to create a vertical line?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323181#M96454</link>
      <description>&lt;P&gt;You are awesome!!!!!!!!!&lt;BR /&gt;
It worked!!!!&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:48:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-timechart-search-to-create-a-vertical-line/m-p/323181#M96454</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-02-23T15:48:17Z</dc:date>
    </item>
  </channel>
</rss>

