<?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: Planned outage graph logic in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403320#M116704</link>
    <description>&lt;P&gt;My two searches are from 2 different indexes.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 10:56:33 GMT</pubDate>
    <dc:creator>joydeep741</dc:creator>
    <dc:date>2018-06-27T10:56:33Z</dc:date>
    <item>
      <title>Planned outage graph logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403318#M116702</link>
      <description>&lt;P&gt;I want to build a logic for SEARCH-2&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My SEARCH -1&lt;/STRONG&gt; &lt;BR /&gt;
Gives me start and End time stamp of a Planned Outage.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My SEARCH-2&lt;/STRONG&gt; &lt;BR /&gt;
Gives me the availaiblity graph of my server.&lt;BR /&gt;
Now in the availibility graph, if the timestamp is in the time range of planned outage (given by search 1) than I should mark that as "planned outage" (so that no one is confused whether its planned or an actual outage).&lt;/P&gt;

&lt;P&gt;index=avail sourcetype=availaibility | if availaibility == 0 | check if the time of event is in the time range given by SUB SEARCH ""My Search 1&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 16:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403318#M116702</guid>
      <dc:creator>joydeep741</dc:creator>
      <dc:date>2018-06-25T16:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Planned outage graph logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403319#M116703</link>
      <description>&lt;P&gt;Hi @joydeep741,&lt;BR /&gt;
Try something similar,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* earliest=-4h@h|bucket span=1h _time|stats count by component,_time|eval time=_time|eval status=if(count&amp;gt;100,1,0) 
|appendcols [search index=_* earliest=-3h@h latest=-1h@h|stats earliest(_time) as earliest,latest(_time) as latest|fields earliest,latest]| filldown
|eval maintenance=if(_time&amp;gt;=earliest AND _time &amp;lt;= latest,1,0)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here I take last 4 hours of data and compare it against a planned maintenance of 1 hr (between 3rd and 2nd hour). Do you have data in two different indexes? If the above doesnt work for you, please provide some sample data from both searches&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 04:13:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403319#M116703</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-26T04:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Planned outage graph logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403320#M116704</link>
      <description>&lt;P&gt;My two searches are from 2 different indexes.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 10:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403320#M116704</guid>
      <dc:creator>joydeep741</dc:creator>
      <dc:date>2018-06-27T10:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Planned outage graph logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403321#M116705</link>
      <description>&lt;P&gt;@joydeep741,&lt;/P&gt;

&lt;P&gt;That does not matter. Above is just an example. you could write your searches in the same way or if you could provide some sample events from both indexes, we could help you&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 00:49:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403321#M116705</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-28T00:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Planned outage graph logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403322#M116706</link>
      <description>&lt;P&gt;@joydeep741, if you are on Splunk 7+, seems a good candidate for &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartEventAnnotations"&gt;Chart Event Annotation&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Otherwise approach would be similar to what @renjith.nair mentioned. Refer to following old but useful blog on overlaying information on timechart: &lt;A href="https://www.splunk.com/blog/2012/02/19/compare-two-time-ranges-in-one-report.html"&gt;https://www.splunk.com/blog/2012/02/19/compare-two-time-ranges-in-one-report.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 05:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Planned-outage-graph-logic/m-p/403322#M116706</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-28T05:52:13Z</dc:date>
    </item>
  </channel>
</rss>

