<?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: Can I use a macro within a macro? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189941#M54701</link>
    <description>&lt;P&gt;See the Splunk documentation for this: &lt;A href="http://docs.splunk.com/Splexicon:Searchmacro"&gt;http://docs.splunk.com/Splexicon:Searchmacro&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Directly from the docs: "&lt;EM&gt;You can also nest search macros within each other.&lt;/EM&gt;"&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2014 19:04:06 GMT</pubDate>
    <dc:creator>edschembor</dc:creator>
    <dc:date>2014-06-05T19:04:06Z</dc:date>
    <item>
      <title>Can I use a macro within a macro?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189939#M54699</link>
      <description>&lt;P&gt;Wondering if it's possible to embed a macro into another macro.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 18:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189939#M54699</guid>
      <dc:creator>Dimitri_McKay</dc:creator>
      <dc:date>2014-06-05T18:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a macro within a macro?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189940#M54700</link>
      <description>&lt;P&gt;Yes it is possible. &lt;/P&gt;

&lt;P&gt;Here is one example.&lt;BR /&gt;
Definition&lt;/P&gt;

&lt;P&gt;macros.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[getCountStatus(1)]
args = count
definition = eval CountStatus=if($count$&amp;gt;100,"Heavy","Light")
iseval = 0

[getRowColorWithCountStatus(1)]
args = count
definition = `getCountStatus($count$)` | eval RowColor=if(CountStatus="Heavy","Read","Green")
iseval = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Usage:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-15m@m  | stats count by sourcetype |`getRowColorWithCountStatus(count)`
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jun 2014 19:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189940#M54700</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-05T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a macro within a macro?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189941#M54701</link>
      <description>&lt;P&gt;See the Splunk documentation for this: &lt;A href="http://docs.splunk.com/Splexicon:Searchmacro"&gt;http://docs.splunk.com/Splexicon:Searchmacro&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Directly from the docs: "&lt;EM&gt;You can also nest search macros within each other.&lt;/EM&gt;"&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 19:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-macro-within-a-macro/m-p/189941#M54701</guid>
      <dc:creator>edschembor</dc:creator>
      <dc:date>2014-06-05T19:04:06Z</dc:date>
    </item>
  </channel>
</rss>

