<?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: I have developed a good search, but need to notify a recovery or alert depending on the output of the search.  The difference between the two outcomes is just a couple of lines that I have not been able to configure in a single search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316812#M94800</link>
    <description>&lt;P&gt;That's what I wasn't considering -- running separate search.  Thanks for the guidance; it does appear to give me what I'm looking for.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2017 17:48:57 GMT</pubDate>
    <dc:creator>rcole2</dc:creator>
    <dc:date>2017-04-12T17:48:57Z</dc:date>
    <item>
      <title>I have developed a good search, but need to notify a recovery or alert depending on the output of the search.  The difference between the two outcomes is just a couple of lines that I have not been able to configure in a single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316809#M94797</link>
      <description>&lt;P&gt;Snippet of search&lt;BR /&gt;
SEARCH &lt;BR /&gt;
| eval runmacro = if(deltadif="NO","&lt;CODE&gt;TurnTimeRecovered&lt;/CODE&gt;","&lt;CODE&gt;TurnTimeWarning&lt;/CODE&gt;")&lt;BR /&gt;
runmacro&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;comment(" +++++++++TurnTimeWarning&lt;BR /&gt;
| where alertnamecount&amp;gt;0&lt;BR /&gt;
| where alertnamecount=(count+1)&lt;BR /&gt;
+++++++++++++++ ")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;comment(" +++++++++TurnTimeRecovered&lt;BR /&gt;
| where alertnamecount=0&lt;BR /&gt;
| head 1 &lt;BR /&gt;
| where count=1&lt;BR /&gt;
| where deltadif = "NO"&lt;BR /&gt;
++++++++++++ ")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The macros exist and the comments above are the exact macros.  From the 'deltadif' value I need to perform one of the above macros.  This runs successfully, but it appears the macro is not executing.  When I run each one inline, they function as expected, but require a unique search for each.&lt;BR /&gt;
Can a variable be set as a macro and be called; if so how?  Or is there a better solution?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 14:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316809#M94797</guid>
      <dc:creator>rcole2</dc:creator>
      <dc:date>2017-04-10T14:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: I have developed a good search, but need to notify a recovery or alert depending on the output of the search.  The difference between the two outcomes is just a couple of lines that I have not been able to configure in a single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316810#M94798</link>
      <description>&lt;P&gt;Yes, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | eval runmacro = if(deltadif="NO","`TurnTimeRecovered`","`TurnTimeWarning`")
| map search="search Other Stuff Here | `$runmacro$`"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Apr 2017 17:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316810#M94798</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-10T17:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: I have developed a good search, but need to notify a recovery or alert depending on the output of the search.  The difference between the two outcomes is just a couple of lines that I have not been able to configure in a single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316811#M94799</link>
      <description>&lt;P&gt;You can turn this inside-out and do the same thing with a &lt;CODE&gt;subsearch&lt;/CODE&gt;:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchTutorial/Useasubsearch"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchTutorial/Useasubsearch&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The 2 templatizing approaches are &lt;CODE&gt;map&lt;/CODE&gt; and &lt;CODE&gt;subsearch&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 01:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316811#M94799</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-11T01:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: I have developed a good search, but need to notify a recovery or alert depending on the output of the search.  The difference between the two outcomes is just a couple of lines that I have not been able to configure in a single search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316812#M94800</link>
      <description>&lt;P&gt;That's what I wasn't considering -- running separate search.  Thanks for the guidance; it does appear to give me what I'm looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 17:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-developed-a-good-search-but-need-to-notify-a-recovery-or/m-p/316812#M94800</guid>
      <dc:creator>rcole2</dc:creator>
      <dc:date>2017-04-12T17:48:57Z</dc:date>
    </item>
  </channel>
</rss>

